@Requires(beans=io.micronaut.session.SessionStore.class) @Requires(property="micronaut.security.oauth2.openid.nonce.persistence",value="session") @Singleton public class SessionNoncePersistence extends java.lang.Object implements NoncePersistence
Constructor and Description |
---|
SessionNoncePersistence(io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore) |
Modifier and Type | Method and Description |
---|---|
void |
persistNonce(io.micronaut.http.HttpRequest<?> request,
io.micronaut.http.MutableHttpResponse response,
java.lang.String state)
Persists the nonce for later retrieval to allow validation.
|
java.util.Optional<java.lang.String> |
retrieveNonce(io.micronaut.http.HttpRequest<?> request)
Retrieves and removes the nonce from persistence.
|
public SessionNoncePersistence(io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore)
sessionStore
- The session storepublic java.util.Optional<java.lang.String> retrieveNonce(io.micronaut.http.HttpRequest<?> request)
NoncePersistence
retrieveNonce
in interface NoncePersistence
request
- The requestpublic void persistNonce(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.MutableHttpResponse response, java.lang.String state)
NoncePersistence
persistNonce
in interface NoncePersistence
request
- The login requestresponse
- The authorization redirect responsestate
- The nonce to persist