Package com.irurueta.authserver.authorization.application.totp


package com.irurueta.authserver.authorization.application.totp
Use cases of the TOTP authenticator-app second factor and its recovery codes.
  • Classes
    Class
    Description
    Use case that confirms the enrolment of an authenticator app inside the sign-in, where the code also stands as the second factor of that sign-in: like VerifyTotpUseCase, a locked second factor is refused, a wrong code counts towards the lockout and a right one clears the counter and is audited.
    Use case that finishes the enrolment of an authenticator app with the first code it shows.
    Use case that counts the recovery codes a user still has, so the UI can warn when few are left.
    Use case that removes the authenticator app of a user together with the recovery codes that went with it.
    Use case that starts the enrolment of an authenticator app: it generates a secret, stores it encrypted and unconfirmed (replacing any earlier unconfirmed one) and returns the otpauth:// URI to show as a QR code.
    Use case that creates a fresh set of recovery codes for a user, replacing any previous set.
    Use case that tells whether a user has a confirmed authenticator app.
    Creates recovery codes (Crockford base-32 alphabet, so no I, L, O or U) and normalizes what a user types back into that form.
    Use case that accepts a recovery code as a second factor.
    Use case that verifies a TOTP code presented as a second factor: ±1 step window, no replay of a step already used, lockout after repeated failures, and an audit event either way.