Uses of Package
com.irurueta.authserver.authorization.api.web.ott

Package
Description
One-time token authentication: e-mail and SMS codes and magic links as a primary sign-in method and as a second factor, the per-channel factors, the rate limits, the providers and filters, and the phone management API and account page.
  • Class
    Description
    The verification code of a phone number is wrong, has expired or there is no verification in progress.
    Resolves the request of POST /ott/generate to the token Spring's filter asks the token service for.
    What a request to POST /ott/generate asks for, read from its form fields: through which channel, a numeric code or a magic link, and for a sign-in or as a second factor.
    Delivers the token Spring's filter just generated, and answers every request the same way.
    Builds the magic link of a token.
    The authentication providers of the one-time token methods, held together.
    Rate limiter of the one-time token endpoints, on the pattern of the account endpoints' limiter: Bucket4j token buckets in Caffeine caches (FixedWindowBuckets).
    A client address or an identifier requested or submitted more one-time tokens than its window allows.
    Applies OttRateLimiter to the one-time token endpoints, which are Spring Security filters (so no controller advice sees their failures): POST /ott/generate counts as a token request and POST /login/ott and POST /login/second-factor/ott as submissions, each per client address and per identifier.
    Configuration of the rate limiting of the one-time token endpoints (authserver.ott.rate-limit.*): the requests for a token (POST /ott/generate, the phone enrolment) and the submissions of a token or a code (POST /login/ott, POST /login/second-factor/ott, the phone verification).
    Decides through which channels a one-time code or link may be the second factor of a signed-in user.
    Processes the post of the one-time code form of the second factor (POST /login/second-factor/ott), in the way TotpAuthenticationFilter processes the TOTP forms.
    The one-time token a browser has asked for and not used yet, kept in its session: for whom, through which channel, of which kind and for what purpose, and the binding id the numeric code was stored with.
    Maps the results of the phone use cases onto the DTOs generated from the contract.
    The account has no verified phone number.
    The step-up rule of StepUpGuard for a browser session instead of a bearer token: while the account has a confirmed second factor, a sensitive change (removing the phone) needs a session that shows a multi-factor sign-in made within authserver.mfa.step-up-max-age; an account without a second factor cannot step up, so it is not asked to.
    Rules about the session a one-time token is used as a second factor in: it must already hold a primary factor, and the second factor must not be the very channel that signed the user in (an e-mail code after an e-mail sign-in would prove the same mailbox twice).