Class PendingRecoveryCodes
java.lang.Object
com.irurueta.authserver.authorization.api.web.totp.PendingRecoveryCodes
Keeps, in the session, the recovery codes generated when an authenticator app is enrolled during the sign-in, from
the post that confirms it until the page that shows them once (
RecoveryCodesPageController), which takes
them out of the session.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisPending(jakarta.servlet.http.HttpServletRequest request) Tells whether the session of a request holds codes not shown yet.voidStores the codes in the session of a request.take(jakarta.servlet.http.HttpServletRequest request) Takes the codes out of the session of a request, so they are shown only once.
-
Field Details
-
ATTRIBUTE
Name of the session attribute that holds the codes.
-
-
Constructor Details
-
PendingRecoveryCodes
public PendingRecoveryCodes()
-
-
Method Details
-
save
Stores the codes in the session of a request.- Parameters:
request- the request.codes- the codes in clear text.
-
isPending
public boolean isPending(jakarta.servlet.http.HttpServletRequest request) Tells whether the session of a request holds codes not shown yet.- Parameters:
request- the request.- Returns:
truewhen there are codes waiting to be shown.
-
take
Takes the codes out of the session of a request, so they are shown only once.- Parameters:
request- the request.- Returns:
- the codes; empty when there are none.
-