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 Details

    • SessionStatePersistence

      public SessionStatePersistence(io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore)
      Parameters:
      sessionStore - The session store
  • Method Details

    • retrieveState

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