Class HttpSessionOAuth2AuthorizationRequestRepository

java.lang.Object
org.springframework.security.oauth2.client.web.HttpSessionOAuth2AuthorizationRequestRepository
All Implemented Interfaces:
AuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest>

public final class HttpSessionOAuth2AuthorizationRequestRepository extends Object implements AuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest>
An implementation of an AuthorizationRequestRepository that stores OAuth2AuthorizationRequest in the HttpSession.
Since:
5.0
See Also:
  • Constructor Summary

    Constructors
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest
    loadAuthorizationRequest(jakarta.servlet.http.HttpServletRequest request)
    Returns the OAuth2AuthorizationRequest associated to the provided HttpServletRequest or null if not available.
    org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest
    removeAuthorizationRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    Removes and returns the OAuth2AuthorizationRequest associated to the provided HttpServletRequest and HttpServletResponse or if not available returns null.
    void
    saveAuthorizationRequest(org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest authorizationRequest, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    Persists the OAuth2AuthorizationRequest associating it to the provided HttpServletRequest and/or HttpServletResponse.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HttpSessionOAuth2AuthorizationRequestRepository

      public HttpSessionOAuth2AuthorizationRequestRepository()
  • Method Details

    • loadAuthorizationRequest

      public org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest loadAuthorizationRequest(jakarta.servlet.http.HttpServletRequest request)
      Description copied from interface: AuthorizationRequestRepository
      Returns the OAuth2AuthorizationRequest associated to the provided HttpServletRequest or null if not available.
      Specified by:
      loadAuthorizationRequest in interface AuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest>
      Parameters:
      request - the HttpServletRequest
      Returns:
      the OAuth2AuthorizationRequest or null if not available
    • saveAuthorizationRequest

      public void saveAuthorizationRequest(org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest authorizationRequest, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Description copied from interface: AuthorizationRequestRepository
      Persists the OAuth2AuthorizationRequest associating it to the provided HttpServletRequest and/or HttpServletResponse.
      Specified by:
      saveAuthorizationRequest in interface AuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest>
      Parameters:
      authorizationRequest - the OAuth2AuthorizationRequest
      request - the HttpServletRequest
      response - the HttpServletResponse
    • removeAuthorizationRequest

      public org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest removeAuthorizationRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Description copied from interface: AuthorizationRequestRepository
      Removes and returns the OAuth2AuthorizationRequest associated to the provided HttpServletRequest and HttpServletResponse or if not available returns null.
      Specified by:
      removeAuthorizationRequest in interface AuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest>
      Parameters:
      request - the HttpServletRequest
      response - the HttpServletResponse
      Returns:
      the OAuth2AuthorizationRequest or null if not available