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 Details

  • Method Details

    • retrieveNonce

      public Optional<String> retrieveNonce(io.micronaut.http.HttpRequest<?> request)
      Description copied from interface: NoncePersistence
      Retrieves and removes the nonce from persistence.
      Specified by:
      retrieveNonce in interface NoncePersistence
      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 interface NoncePersistence
      Parameters:
      request - The login request
      response - The authorization redirect response
      nonce - The nonce to persist