Class SessionNoncePersistence
java.lang.Object
io.micronaut.security.oauth2.endpoint.nonce.persistence.session.SessionNoncePersistence
- All Implemented Interfaces:
NoncePersistence
@Requires(beans=io.micronaut.session.SessionStore.class) @Requires(property="micronaut.security.oauth2.openid.nonce.persistence",value="session")
@Singleton
public class SessionNoncePersistence
extends Object
implements NoncePersistence
Persists the state in the session.
- Since:
- 1.2.0
- Author:
- James Kleeh
-
Constructor Summary
ConstructorDescriptionSessionNoncePersistence
(io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore) -
Method Summary
Modifier and TypeMethodDescriptionvoid
persistNonce
(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.MutableHttpResponse response, String state) Persists the nonce for later retrieval to allow validation.retrieveNonce
(io.micronaut.http.HttpRequest<?> request) Retrieves and removes the nonce from persistence.
-
Constructor Details
-
SessionNoncePersistence
public SessionNoncePersistence(io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore) - Parameters:
sessionStore
- The session store
-
-
Method Details
-
retrieveNonce
Description copied from interface:NoncePersistence
Retrieves and removes the nonce from persistence.- Specified by:
retrieveNonce
in interfaceNoncePersistence
- Parameters:
request
- The request- Returns:
- The optional nonce
-
persistNonce
public void persistNonce(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.MutableHttpResponse response, String state) Description copied from interface:NoncePersistence
Persists the nonce for later retrieval to allow validation.- Specified by:
persistNonce
in interfaceNoncePersistence
- Parameters:
request
- The login requestresponse
- The authorization redirect responsestate
- The nonce to persist
-