Class CookieNoncePersistence
java.lang.Object
io.micronaut.security.oauth2.endpoint.nonce.persistence.cookie.CookieNoncePersistence
- All Implemented Interfaces:
NoncePersistence
@Requires(property="micronaut.security.oauth2.openid.nonce.persistence",
value="cookie",
defaultValue="cookie")
@Singleton
public class CookieNoncePersistence
extends Object
implements NoncePersistence
Nonce persistence with a cookie.
- Since:
- 1.2.0
- Author:
- James Kleeh, Sergio del Amo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
persistNonce
(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.MutableHttpResponse response, String nonce) Persists the nonce for later retrieval to allow validation.retrieveNonce
(io.micronaut.http.HttpRequest<?> request) Retrieves and removes the nonce from persistence.
-
Constructor Details
-
CookieNoncePersistence
- Parameters:
configuration
- The cookie configuration
-
-
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 nonce) 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 responsenonce
- The nonce to persist
-