Class ServerOAuth2AuthorizationCodeAuthenticationTokenConverter
- java.lang.Object
-
- org.springframework.security.oauth2.client.web.server.ServerOAuth2AuthorizationCodeAuthenticationTokenConverter
-
- All Implemented Interfaces:
ServerAuthenticationConverter
public class ServerOAuth2AuthorizationCodeAuthenticationTokenConverter extends java.lang.Object implements ServerAuthenticationConverter
Converts from aServerWebExchange
to anOAuth2AuthorizationCodeAuthenticationToken
that can be authenticated. The converter does not validate any errors it only performs a conversion.
-
-
Constructor Summary
Constructors Constructor Description ServerOAuth2AuthorizationCodeAuthenticationTokenConverter(ReactiveClientRegistrationRepository clientRegistrationRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<Authentication>
convert(org.springframework.web.server.ServerWebExchange serverWebExchange)
Converts aServerWebExchange
to anAuthentication
void
setAuthorizationRequestRepository(ServerAuthorizationRequestRepository<OAuth2AuthorizationRequest> authorizationRequestRepository)
Sets theServerAuthorizationRequestRepository
to be used.
-
-
-
Constructor Detail
-
ServerOAuth2AuthorizationCodeAuthenticationTokenConverter
public ServerOAuth2AuthorizationCodeAuthenticationTokenConverter(ReactiveClientRegistrationRepository clientRegistrationRepository)
-
-
Method Detail
-
setAuthorizationRequestRepository
public void setAuthorizationRequestRepository(ServerAuthorizationRequestRepository<OAuth2AuthorizationRequest> authorizationRequestRepository)
Sets theServerAuthorizationRequestRepository
to be used. The default isWebSessionOAuth2ServerAuthorizationRequestRepository
.- Parameters:
authorizationRequestRepository
- the repository to use.
-
convert
public reactor.core.publisher.Mono<Authentication> convert(org.springframework.web.server.ServerWebExchange serverWebExchange)
Description copied from interface:ServerAuthenticationConverter
Converts aServerWebExchange
to anAuthentication
- Specified by:
convert
in interfaceServerAuthenticationConverter
- Parameters:
serverWebExchange
- TheServerWebExchange
- Returns:
- A
Mono
representing anAuthentication
-
-