Class HttpSessionOAuth2AuthorizationRequestRepository
- java.lang.Object
-
- org.springframework.security.oauth2.client.web.HttpSessionOAuth2AuthorizationRequestRepository
-
- All Implemented Interfaces:
AuthorizationRequestRepository<OAuth2AuthorizationRequest>
public final class HttpSessionOAuth2AuthorizationRequestRepository extends java.lang.Object implements AuthorizationRequestRepository<OAuth2AuthorizationRequest>
An implementation of anAuthorizationRequestRepository
that storesOAuth2AuthorizationRequest
in 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 OAuth2AuthorizationRequest
loadAuthorizationRequest(javax.servlet.http.HttpServletRequest request)
Returns theOAuth2AuthorizationRequest
associated to the providedHttpServletRequest
ornull
if not available.OAuth2AuthorizationRequest
removeAuthorizationRequest(javax.servlet.http.HttpServletRequest request)
Removes and returns theOAuth2AuthorizationRequest
associated to the providedHttpServletRequest
or if not available returnsnull
.OAuth2AuthorizationRequest
removeAuthorizationRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Removes and returns theOAuth2AuthorizationRequest
associated to the providedHttpServletRequest
andHttpServletResponse
or if not available returnsnull
.void
saveAuthorizationRequest(OAuth2AuthorizationRequest authorizationRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Persists theOAuth2AuthorizationRequest
associating it to the providedHttpServletRequest
and/orHttpServletResponse
.void
setAllowMultipleAuthorizationRequests(boolean allowMultipleAuthorizationRequests)
Deprecated.
-
-
-
Method Detail
-
loadAuthorizationRequest
public OAuth2AuthorizationRequest loadAuthorizationRequest(javax.servlet.http.HttpServletRequest request)
Description copied from interface:AuthorizationRequestRepository
Returns theOAuth2AuthorizationRequest
associated to the providedHttpServletRequest
ornull
if not available.- Specified by:
loadAuthorizationRequest
in interfaceAuthorizationRequestRepository<OAuth2AuthorizationRequest>
- Parameters:
request
- theHttpServletRequest
- Returns:
- the
OAuth2AuthorizationRequest
ornull
if not available
-
saveAuthorizationRequest
public void saveAuthorizationRequest(OAuth2AuthorizationRequest authorizationRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Description copied from interface:AuthorizationRequestRepository
Persists theOAuth2AuthorizationRequest
associating it to the providedHttpServletRequest
and/orHttpServletResponse
.- Specified by:
saveAuthorizationRequest
in interfaceAuthorizationRequestRepository<OAuth2AuthorizationRequest>
- Parameters:
authorizationRequest
- theOAuth2AuthorizationRequest
request
- theHttpServletRequest
response
- theHttpServletResponse
-
removeAuthorizationRequest
public OAuth2AuthorizationRequest removeAuthorizationRequest(javax.servlet.http.HttpServletRequest request)
Description copied from interface:AuthorizationRequestRepository
Removes and returns theOAuth2AuthorizationRequest
associated to the providedHttpServletRequest
or if not available returnsnull
.- Specified by:
removeAuthorizationRequest
in interfaceAuthorizationRequestRepository<OAuth2AuthorizationRequest>
- Parameters:
request
- theHttpServletRequest
- Returns:
- the removed
OAuth2AuthorizationRequest
ornull
if not available
-
removeAuthorizationRequest
public OAuth2AuthorizationRequest removeAuthorizationRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Description copied from interface:AuthorizationRequestRepository
Removes and returns theOAuth2AuthorizationRequest
associated to the providedHttpServletRequest
andHttpServletResponse
or if not available returnsnull
.- Specified by:
removeAuthorizationRequest
in interfaceAuthorizationRequestRepository<OAuth2AuthorizationRequest>
- Parameters:
request
- theHttpServletRequest
response
- theHttpServletResponse
- Returns:
- the
OAuth2AuthorizationRequest
ornull
if not available
-
setAllowMultipleAuthorizationRequests
@Deprecated public void setAllowMultipleAuthorizationRequests(boolean allowMultipleAuthorizationRequests)
Deprecated.Configure if multipleOAuth2AuthorizationRequest
s should be stored per session. Default is false (not allow multipleOAuth2AuthorizationRequest
per session).- Parameters:
allowMultipleAuthorizationRequests
- true allows more than oneOAuth2AuthorizationRequest
to be stored per session.- Since:
- 5.5
-
-