vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit d3f357b7089fc649ff95eb067cd061e2fc3a608b
parent 16056626b0d34087b75e75470b3c8a6975faef55
Author: Daniel GarcĂ­a <dani-garcia@users.noreply.github.com>
Date:   Mon, 13 Aug 2018 15:26:01 +0200

Implemented PUT for u2f registration

Diffstat:
Msrc/api/core/mod.rs | 1+
Msrc/api/core/two_factor.rs | 5+++++
2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs @@ -73,6 +73,7 @@ pub fn routes() -> Vec<Route> { activate_authenticator_put, generate_u2f, activate_u2f, + activate_u2f_put, get_organization, create_organization, diff --git a/src/api/core/two_factor.rs b/src/api/core/two_factor.rs @@ -374,6 +374,11 @@ fn activate_u2f(data: JsonUpcase<EnableU2FData>, headers: Headers, conn: DbConn) } } +#[put("/two-factor/u2f", data = "<data>")] +fn activate_u2f_put(data: JsonUpcase<EnableU2FData>, headers: Headers, conn: DbConn) -> JsonResult { + activate_u2f(data,headers, conn) +} + fn _create_u2f_challenge(user_uuid: &str, type_: TwoFactorType, conn: &DbConn) -> Challenge { let challenge = U2F.generate_challenge().unwrap();