Skip to content

Commit

Permalink
security: No longer allow user_hash for esup-otp-manager routes (requ…
Browse files Browse the repository at this point in the history
…ire esup-otp-manager => 1.4.0)
  • Loading branch information
floriannari committed Jul 16, 2024
1 parent cd3c3b0 commit 5d889c5
Show file tree
Hide file tree
Showing 5 changed files with 201 additions and 189 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
esup-otp-api is a RESTful api using NodeJS to generate, send and verify one-time codes for [EsupPortail]

### Version
1.5.0
1.6.0

Runs on Node v20.11.1 and npm v10.2.4

Expand Down
6 changes: 5 additions & 1 deletion controllers/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ export async function verify_code(req, res) {
throw new errors.InvalidCredentialsError();
}


/**
* Génére un nouvel attribut d'auth (secret key ou matrice ou bypass codes)
*
Expand Down Expand Up @@ -414,6 +413,11 @@ export async function delete_method_secret(req, res) {
return method.delete_method_secret(user, req, res);
}

export async function generate_webauthn_method_secret(req, res) {
req.params.method = "webauthn";
return generate_method_secret(req, res);
}

export async function verify_webauthn_auth(req, res) {
req.params.method = "webauthn";
const { user, method } = await getUserAndMethodModule(req);
Expand Down
Loading

0 comments on commit 5d889c5

Please sign in to comment.