Class RecoveryCodesPageController
java.lang.Object
com.irurueta.authserver.authorization.api.web.totp.RecoveryCodesPageController
- All Implemented Interfaces:
RecoveryCodesPageApi
Serves the page that shows, once, the recovery codes generated when an authenticator app was enrolled during the
sign-in, as the contract
apis/auth-server/web-pages/auth-server-pages-v1.yaml describes it through the
generated RecoveryCodesPageApi. The codes are taken out of the session as the page is rendered, so a reload
shows none; its "Continue" button resumes the request the sign-in interrupted (kept by the session request cache),
or goes to the root when there is none.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final StringName of the model attribute that holds the codes.(package private) static final StringName of the model attribute that holds where the "Continue" button goes.(package private) static final StringWhere the "Continue" button goes when no request is waiting to be resumed.private final PageRendererRenders the page.private final PendingRecoveryCodesKeeps the codes waiting to be shown.static final StringPath of the page, taken from the contract.private final jakarta.servlet.http.HttpServletRequestThe current request, injected as a thread-bound proxy.private final org.springframework.security.web.savedrequest.RequestCacheCache that keeps the interrupted request, shared with the form login and the second-factor entry point.private final jakarta.servlet.http.HttpServletResponseThe current response, injected as a thread-bound proxy.(package private) static final StringName of the template.Fields inherited from interface com.irurueta.authserver.authorization.api.web.pages.v1.generated.api.RecoveryCodesPageApi
PATH_RECOVERY_CODES_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String> Renders the page and forgets the codes.
-
Field Details
-
RECOVERY_CODES_PATH
Path of the page, taken from the contract.- See Also:
-
VIEW_NAME
Name of the template.- See Also:
-
CODES_ATTRIBUTE
Name of the model attribute that holds the codes.- See Also:
-
CONTINUE_ATTRIBUTE
Name of the model attribute that holds where the "Continue" button goes.- See Also:
-
DEFAULT_CONTINUE_URL
Where the "Continue" button goes when no request is waiting to be resumed.- See Also:
-
requestCache
private final org.springframework.security.web.savedrequest.RequestCache requestCacheCache that keeps the interrupted request, shared with the form login and the second-factor entry point. -
pendingRecoveryCodes
Keeps the codes waiting to be shown. -
pageRenderer
Renders the page. -
request
private final jakarta.servlet.http.HttpServletRequest requestThe current request, injected as a thread-bound proxy. -
response
private final jakarta.servlet.http.HttpServletResponse responseThe current response, injected as a thread-bound proxy.
-
-
Constructor Details
-
RecoveryCodesPageController
public RecoveryCodesPageController()
-
-
Method Details
-
recoveryCodesPage
Renders the page and forgets the codes.- Specified by:
recoveryCodesPagein interfaceRecoveryCodesPageApi- Returns:
- the recovery codes page.
-