@Requires(beans=io.micronaut.session.SessionStore.class) @Singleton public class SessionPkcePersistence extends java.lang.Object implements PkcePersistence
Constructor and Description |
---|
SessionPkcePersistence(io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore) |
Modifier and Type | Method and Description |
---|---|
void |
persistPkce(io.micronaut.http.HttpRequest<?> request,
io.micronaut.http.MutableHttpResponse<?> response,
Pkce pkce)
Persists the PKCE for later retrieval.
|
java.util.Optional<java.lang.String> |
retrieveCodeVerifier(io.micronaut.http.HttpRequest<?> request)
Retrieve the code verifier and removes it from the session if present.
|
public SessionPkcePersistence(io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore)
sessionStore
- The session store@NonNull public java.util.Optional<java.lang.String> retrieveCodeVerifier(@NonNull io.micronaut.http.HttpRequest<?> request)
retrieveCodeVerifier
in interface PkcePersistence
request
- The requestpublic void persistPkce(@NonNull io.micronaut.http.HttpRequest<?> request, @NonNull io.micronaut.http.MutableHttpResponse<?> response, @NonNull Pkce pkce)
PkcePersistence
persistPkce
in interface PkcePersistence
request
- The login requestresponse
- The authorization redirect responsepkce
- The PKCE to persist