Package com.irurueta.authserver.authorization.application.mfa
package com.irurueta.authserver.authorization.application.mfa
Use cases of the multi-factor framework: security events, second-factor lockout and trusted devices.
-
ClassDescriptionUse case that tells whether the second factor of a user is locked after too many failed attempts.Use case that deletes the trusted devices that have expired, since they can never be used again.A trusted device just created, with the signed cookie value that is only available now.Use case that trusts the browser of a user for some days so it skips the second factor.Use case that finds the usable (not revoked, not expired) trusted device of a user from the value of the cookie.Use case that tells whether a user has confirmed any second factor, asking every
SecondFactorEnrolmentQuerybean.Use case that tells whether a client makes multi-factor authentication mandatory for every user signing in through it (ClientRegistration.mfaRequired()).Use case that tells whether the account of a user requires a second factor, whatever the client being served: when an administrator forced it (users.mfa_required) or when the user has confirmed a second factor (asked toHasConfirmedSecondFactorUseCase), since a factor the user enrolled must protect every sign-in.Use case that lists the trusted devices of a user that have not expired.Exposes the domain collaborators of the multi-factor use cases as beans, so no use case creates them and a deployment (or a test) can replace any of them, and binds theMfaProperties.Multi-factor settings, bound once fromauthserver.mfa.*and injected wherever one of them is needed (the use cases of this module and the step-up guard of the API).Use case that records a security event (login, second factor, lockout, trusted device) in the audit log.Use case that counts a failed second-factor attempt and locks the second factor of the user onceauthserver.mfa.max-failed-attemptsconsecutive failures are reached.Use case that clears the failed second-factor attempts of a user, after a successful verification.Use case that revokes a trusted device of a user, so it asks for the second factor again.Extension point that tells whether a user has confirmed one kind of second factor.Creates the random tokens that identify a trusted device and hashes them, so only the SHA-256 hash is ever stored.