java.lang.Object
io.micronaut.security.oauth2.endpoint.authorization.CookiePersistence
io.micronaut.security.oauth2.endpoint.authorization.pkce.persistence.cookie.CookiePkcePersistence
All Implemented Interfaces:
PkcePersistence

@Singleton public class CookiePkcePersistence extends CookiePersistence implements PkcePersistence
Persists the Proof of Key Exchange (PKCE) code_verifier value in a cookie.
Since:
3.9.0
Author:
Nemanja Mikic
  • Constructor Details

  • Method Details

    • retrieveCodeVerifier

      @NonNull public @NonNull Optional<String> retrieveCodeVerifier(@NonNull @NonNull io.micronaut.http.HttpRequest<?> request)
      Retrieve the code verifier and removes it from the session if present.
      Specified by:
      retrieveCodeVerifier in interface PkcePersistence
      Parameters:
      request - The request
      Returns:
      The optional PKCE code verifier
    • persistPkce

      public void persistPkce(@NonNull @NonNull io.micronaut.http.HttpRequest<?> request, @NonNull @NonNull io.micronaut.http.MutableHttpResponse<?> response, @NonNull @NonNull Pkce pkce)
      Description copied from interface: PkcePersistence
      Persists the PKCE for later retrieval.
      Specified by:
      persistPkce in interface PkcePersistence
      Parameters:
      request - The login request
      response - The authorization redirect response
      pkce - The PKCE to persist