Documented U2F, removed debug prints, and documented missing features

This commit is contained in:
Daniel García
2018-07-13 15:58:50 +02:00
parent 970863ffb1
commit 819622e310
4 changed files with 58 additions and 34 deletions

View File

@@ -14,6 +14,8 @@ use util::{self, JsonMap};
use api::{ApiResult, JsonResult};
use CONFIG;
pub fn routes() -> Vec<Route> {
routes![login]
}
@@ -216,7 +218,7 @@ fn _json_err_twofactor(providers: &[i32], user_uuid: &str, conn: &DbConn) -> Api
match TwoFactorType::from_i32(*provider) {
Some(TwoFactorType::Authenticator) => { /* Nothing to do for TOTP */ }
Some(TwoFactorType::U2f) => {
Some(TwoFactorType::U2f) if CONFIG.domain_set => {
let request = two_factor::generate_u2f_login(user_uuid, conn)?;
let mut challenge_list = Vec::new();