Class SessionStatePersistence
java.lang.Object
io.micronaut.security.oauth2.endpoint.authorization.state.persistence.session.SessionStatePersistence
- All Implemented Interfaces:
StatePersistence
@Requires(beans=io.micronaut.session.SessionStore.class)
@Singleton
public class SessionStatePersistence
extends Object
implements StatePersistence
Persists the state in the session.
- Since:
- 1.2.0
- Author:
- James Kleeh
-
Constructor Summary
ConstructorDescriptionSessionStatePersistence
(io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore) -
Method Summary
Modifier and TypeMethodDescriptionvoid
persistState
(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.MutableHttpResponse response, State state) Persists the state for later retrieval to allow validation.retrieveState
(io.micronaut.http.HttpRequest<?> request) Retrieves and removes the state from persistence.
-
Constructor Details
-
SessionStatePersistence
public SessionStatePersistence(io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore) - Parameters:
sessionStore
- The session store
-
-
Method Details
-
retrieveState
Description copied from interface:StatePersistence
Retrieves and removes the state from persistence.- Specified by:
retrieveState
in interfaceStatePersistence
- Parameters:
request
- The request- Returns:
- The optional state
-
persistState
public void persistState(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.MutableHttpResponse response, State state) Description copied from interface:StatePersistence
Persists the state for later retrieval to allow validation.- Specified by:
persistState
in interfaceStatePersistence
- Parameters:
request
- The login requestresponse
- The authorization redirect responsestate
- The state to persist
-