Class ServerOAuth2AuthorizationCodeAuthenticationTokenConverter
java.lang.Object
org.springframework.security.oauth2.client.web.server.ServerOAuth2AuthorizationCodeAuthenticationTokenConverter
- All Implemented Interfaces:
ServerAuthenticationConverter
public class ServerOAuth2AuthorizationCodeAuthenticationTokenConverter
extends Object
implements ServerAuthenticationConverter
Converts from a
ServerWebExchange to an
OAuth2AuthorizationCodeAuthenticationToken that can be authenticated. The
converter does not validate any errors it only performs a conversion.-
Constructor Summary
ConstructorsConstructorDescriptionServerOAuth2AuthorizationCodeAuthenticationTokenConverter(ReactiveClientRegistrationRepository clientRegistrationRepository) -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Authentication>convert(org.springframework.web.server.ServerWebExchange serverWebExchange) Converts aServerWebExchangeto anAuthenticationvoidsetAuthorizationRequestRepository(ServerAuthorizationRequestRepository<OAuth2AuthorizationRequest> authorizationRequestRepository) Sets theServerAuthorizationRequestRepositoryto be used.
-
Constructor Details
-
ServerOAuth2AuthorizationCodeAuthenticationTokenConverter
public ServerOAuth2AuthorizationCodeAuthenticationTokenConverter(ReactiveClientRegistrationRepository clientRegistrationRepository)
-
-
Method Details
-
setAuthorizationRequestRepository
public void setAuthorizationRequestRepository(ServerAuthorizationRequestRepository<OAuth2AuthorizationRequest> authorizationRequestRepository) Sets theServerAuthorizationRequestRepositoryto 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:ServerAuthenticationConverterConverts aServerWebExchangeto anAuthentication- Specified by:
convertin interfaceServerAuthenticationConverter- Parameters:
serverWebExchange- TheServerWebExchange- Returns:
- A
Monorepresenting anAuthentication
-