@Requires(beans=io.micronaut.session.SessionStore.class) @Singleton public class SessionStatePersistence extends java.lang.Object implements StatePersistence
Constructor and Description |
---|
SessionStatePersistence(io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore) |
Modifier and Type | Method and Description |
---|---|
void |
persistState(io.micronaut.http.HttpRequest<?> request,
io.micronaut.http.MutableHttpResponse response,
State state)
Persists the state for later retrieval to allow validation.
|
java.util.Optional<State> |
retrieveState(io.micronaut.http.HttpRequest<?> request)
Retrieves and removes the state from persistence.
|
public SessionStatePersistence(io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore)
sessionStore
- The session storepublic java.util.Optional<State> retrieveState(io.micronaut.http.HttpRequest<?> request)
StatePersistence
retrieveState
in interface StatePersistence
request
- The requestpublic void persistState(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.MutableHttpResponse response, State state)
StatePersistence
persistState
in interface StatePersistence
request
- The login requestresponse
- The authorization redirect responsestate
- The state to persist