@Requires(property="micronaut.security.oauth2.openid.nonce.persistence", value="cookie", defaultValue="cookie") @Singleton public class CookieNoncePersistence extends java.lang.Object implements NoncePersistence
Constructor and Description |
---|
CookieNoncePersistence(CookieNoncePersistenceConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
void |
persistNonce(io.micronaut.http.HttpRequest<?> request,
io.micronaut.http.MutableHttpResponse response,
java.lang.String nonce)
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 CookieNoncePersistence(CookieNoncePersistenceConfiguration configuration)
configuration
- The cookie configurationpublic 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 nonce)
NoncePersistence
persistNonce
in interface NoncePersistence
request
- The login requestresponse
- The authorization redirect responsenonce
- The nonce to persist