Class RecoveryCodeController

java.lang.Object
com.irurueta.authserver.authorization.api.web.totp.RecoveryCodeController
All Implemented Interfaces:
RecoveryCodesApi

@RestController public class RecoveryCodeController extends Object implements RecoveryCodesApi
Generates a new set of recovery codes for the authenticated account. The path, status codes and body are those of the contract apis/auth-server/rest-server/auth-server-api-v1.yaml, through the generated RecoveryCodesApi. The answer is never cached, since it carries the codes. Replacing the codes needs a recent multi-factor sign-in (StepUpGuard).
  • Field Details

    • currentAccountResolver

      private final CurrentAccountResolver currentAccountResolver
      Resolves the account of the request.
    • stepUpGuard

      private final StepUpGuard stepUpGuard
      Requires a recent multi-factor sign-in before the codes are replaced.
    • generateRecoveryCodesUseCase

      private final GenerateRecoveryCodesUseCase generateRecoveryCodesUseCase
      Generates the codes.
    • totpDtoMapper

      private final TotpDtoMapper totpDtoMapper
      Maps the codes onto the contract's DTO.
  • Constructor Details

    • RecoveryCodeController

      public RecoveryCodeController()
  • Method Details