Class WebSessionOAuth2ServerAuthorizationRequestRepository
- java.lang.Object
-
- org.springframework.security.oauth2.client.web.server.WebSessionOAuth2ServerAuthorizationRequestRepository
-
- All Implemented Interfaces:
ServerAuthorizationRequestRepository<OAuth2AuthorizationRequest>
public final class WebSessionOAuth2ServerAuthorizationRequestRepository extends java.lang.Object implements ServerAuthorizationRequestRepository<OAuth2AuthorizationRequest>
An implementation of anServerAuthorizationRequestRepository
that storesOAuth2AuthorizationRequest
in theWebSession
.- Since:
- 5.1
- See Also:
AuthorizationRequestRepository
,OAuth2AuthorizationRequest
-
-
Constructor Summary
Constructors Constructor Description WebSessionOAuth2ServerAuthorizationRequestRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description reactor.core.publisher.Mono<OAuth2AuthorizationRequest>
loadAuthorizationRequest(org.springframework.web.server.ServerWebExchange exchange)
Returns theOAuth2AuthorizationRequest
associated to the providedHttpServletRequest
ornull
if not available.reactor.core.publisher.Mono<OAuth2AuthorizationRequest>
removeAuthorizationRequest(org.springframework.web.server.ServerWebExchange exchange)
Removes and returns theOAuth2AuthorizationRequest
associated to the providedHttpServletRequest
or if not available returnsnull
.reactor.core.publisher.Mono<java.lang.Void>
saveAuthorizationRequest(OAuth2AuthorizationRequest authorizationRequest, org.springframework.web.server.ServerWebExchange exchange)
Persists theOAuth2AuthorizationRequest
associating it to the providedHttpServletRequest
and/orHttpServletResponse
.void
setAllowMultipleAuthorizationRequests(boolean allowMultipleAuthorizationRequests)
Deprecated.
-
-
-
Method Detail
-
loadAuthorizationRequest
public reactor.core.publisher.Mono<OAuth2AuthorizationRequest> loadAuthorizationRequest(org.springframework.web.server.ServerWebExchange exchange)
Description copied from interface:ServerAuthorizationRequestRepository
Returns theOAuth2AuthorizationRequest
associated to the providedHttpServletRequest
ornull
if not available.- Specified by:
loadAuthorizationRequest
in interfaceServerAuthorizationRequestRepository<OAuth2AuthorizationRequest>
- Parameters:
exchange
- theServerWebExchange
- Returns:
- the
OAuth2AuthorizationRequest
ornull
if not available
-
saveAuthorizationRequest
public reactor.core.publisher.Mono<java.lang.Void> saveAuthorizationRequest(OAuth2AuthorizationRequest authorizationRequest, org.springframework.web.server.ServerWebExchange exchange)
Description copied from interface:ServerAuthorizationRequestRepository
Persists theOAuth2AuthorizationRequest
associating it to the providedHttpServletRequest
and/orHttpServletResponse
.- Specified by:
saveAuthorizationRequest
in interfaceServerAuthorizationRequestRepository<OAuth2AuthorizationRequest>
- Parameters:
authorizationRequest
- theOAuth2AuthorizationRequest
exchange
- theServerWebExchange
-
removeAuthorizationRequest
public reactor.core.publisher.Mono<OAuth2AuthorizationRequest> removeAuthorizationRequest(org.springframework.web.server.ServerWebExchange exchange)
Description copied from interface:ServerAuthorizationRequestRepository
Removes and returns theOAuth2AuthorizationRequest
associated to the providedHttpServletRequest
or if not available returnsnull
.- Specified by:
removeAuthorizationRequest
in interfaceServerAuthorizationRequestRepository<OAuth2AuthorizationRequest>
- Parameters:
exchange
- theServerWebExchange
- Returns:
- the removed
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
-
-