Class HttpSessionOAuth2AuthorizationRequestRepository
java.lang.Object
org.springframework.security.oauth2.client.web.HttpSessionOAuth2AuthorizationRequestRepository
- All Implemented Interfaces:
AuthorizationRequestRepository<OAuth2AuthorizationRequest>
public final class HttpSessionOAuth2AuthorizationRequestRepository
extends Object
implements AuthorizationRequestRepository<OAuth2AuthorizationRequest>
An implementation of an
AuthorizationRequestRepository that stores
OAuth2AuthorizationRequest in the HttpSession.- Since:
- 5.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionloadAuthorizationRequest(jakarta.servlet.http.HttpServletRequest request) Returns theOAuth2AuthorizationRequestassociated to the providedHttpServletRequestornullif not available.removeAuthorizationRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Removes and returns theOAuth2AuthorizationRequestassociated to the providedHttpServletRequestandHttpServletResponseor if not available returnsnull.voidsaveAuthorizationRequest(OAuth2AuthorizationRequest authorizationRequest, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Persists theOAuth2AuthorizationRequestassociating it to the providedHttpServletRequestand/orHttpServletResponse.
-
Constructor Details
-
HttpSessionOAuth2AuthorizationRequestRepository
public HttpSessionOAuth2AuthorizationRequestRepository()
-
-
Method Details
-
loadAuthorizationRequest
public OAuth2AuthorizationRequest loadAuthorizationRequest(jakarta.servlet.http.HttpServletRequest request) Description copied from interface:AuthorizationRequestRepositoryReturns theOAuth2AuthorizationRequestassociated to the providedHttpServletRequestornullif not available.- Specified by:
loadAuthorizationRequestin interfaceAuthorizationRequestRepository<OAuth2AuthorizationRequest>- Parameters:
request- theHttpServletRequest- Returns:
- the
OAuth2AuthorizationRequestornullif not available
-
saveAuthorizationRequest
public void saveAuthorizationRequest(OAuth2AuthorizationRequest authorizationRequest, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Description copied from interface:AuthorizationRequestRepositoryPersists theOAuth2AuthorizationRequestassociating it to the providedHttpServletRequestand/orHttpServletResponse.- Specified by:
saveAuthorizationRequestin interfaceAuthorizationRequestRepository<OAuth2AuthorizationRequest>- Parameters:
authorizationRequest- theOAuth2AuthorizationRequestrequest- theHttpServletRequestresponse- theHttpServletResponse
-
removeAuthorizationRequest
public OAuth2AuthorizationRequest removeAuthorizationRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Description copied from interface:AuthorizationRequestRepositoryRemoves and returns theOAuth2AuthorizationRequestassociated to the providedHttpServletRequestandHttpServletResponseor if not available returnsnull.- Specified by:
removeAuthorizationRequestin interfaceAuthorizationRequestRepository<OAuth2AuthorizationRequest>- Parameters:
request- theHttpServletRequestresponse- theHttpServletResponse- Returns:
- the
OAuth2AuthorizationRequestornullif not available
-