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 java.lang.Object implements AuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest>
An implementation of anAuthorizationRequestRepositorythat storesOAuth2AuthorizationRequestin theHttpSession.- Since:
- 5.0
- See Also:
AuthorizationRequestRepository,OAuth2AuthorizationRequest
-
-
Constructor Summary
Constructors Constructor Description HttpSessionOAuth2AuthorizationRequestRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequestloadAuthorizationRequest(javax.servlet.http.HttpServletRequest request)Returns theOAuth2AuthorizationRequestassociated to the providedHttpServletRequestornullif not available.org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequestremoveAuthorizationRequest(javax.servlet.http.HttpServletRequest request)Removes and returns theOAuth2AuthorizationRequestassociated to the providedHttpServletRequestor if not available returnsnull.org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequestremoveAuthorizationRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Removes and returns theOAuth2AuthorizationRequestassociated to the providedHttpServletRequestandHttpServletResponseor if not available returnsnull.voidsaveAuthorizationRequest(org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest authorizationRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Persists theOAuth2AuthorizationRequestassociating it to the providedHttpServletRequestand/orHttpServletResponse.voidsetAllowMultipleAuthorizationRequests(boolean allowMultipleAuthorizationRequests)Deprecated.
-
-
-
Method Detail
-
loadAuthorizationRequest
public org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest loadAuthorizationRequest(javax.servlet.http.HttpServletRequest request)
Description copied from interface:AuthorizationRequestRepositoryReturns theOAuth2AuthorizationRequestassociated to the providedHttpServletRequestornullif not available.- Specified by:
loadAuthorizationRequestin interfaceAuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest>- Parameters:
request- theHttpServletRequest- Returns:
- the
OAuth2AuthorizationRequestornullif not available
-
saveAuthorizationRequest
public void saveAuthorizationRequest(org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest authorizationRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Description copied from interface:AuthorizationRequestRepositoryPersists theOAuth2AuthorizationRequestassociating it to the providedHttpServletRequestand/orHttpServletResponse.- Specified by:
saveAuthorizationRequestin interfaceAuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest>- Parameters:
authorizationRequest- theOAuth2AuthorizationRequestrequest- theHttpServletRequestresponse- theHttpServletResponse
-
removeAuthorizationRequest
public org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest removeAuthorizationRequest(javax.servlet.http.HttpServletRequest request)
Description copied from interface:AuthorizationRequestRepositoryRemoves and returns theOAuth2AuthorizationRequestassociated to the providedHttpServletRequestor if not available returnsnull.- Specified by:
removeAuthorizationRequestin interfaceAuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest>- Parameters:
request- theHttpServletRequest- Returns:
- the removed
OAuth2AuthorizationRequestornullif not available
-
removeAuthorizationRequest
public org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest removeAuthorizationRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Description copied from interface:AuthorizationRequestRepositoryRemoves and returns theOAuth2AuthorizationRequestassociated to the providedHttpServletRequestandHttpServletResponseor if not available returnsnull.- Specified by:
removeAuthorizationRequestin interfaceAuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest>- Parameters:
request- theHttpServletRequestresponse- theHttpServletResponse- Returns:
- the
OAuth2AuthorizationRequestornullif not available
-
setAllowMultipleAuthorizationRequests
@Deprecated public void setAllowMultipleAuthorizationRequests(boolean allowMultipleAuthorizationRequests)
Deprecated.Configure if multipleOAuth2AuthorizationRequests should be stored per session. Default is false (not allow multipleOAuth2AuthorizationRequestper session).- Parameters:
allowMultipleAuthorizationRequests- true allows more than oneOAuth2AuthorizationRequestto be stored per session.- Since:
- 5.5
-
-