public class OAuth2LoginReactiveAuthenticationManager extends java.lang.Object implements ReactiveAuthenticationManager
AuthenticationProviderfor OAuth 2.0 Login, which leverages the OAuth 2.0 Authorization Code Grant Flow. This
AuthenticationProvideris responsible for authenticating an Authorization Code credential with the Authorization Server's Token Endpoint and if valid, exchanging it for an Access Token credential.
It will also obtain the user attributes of the End-User (Resource Owner) from the
UserInfo Endpoint using an
will create a
Principal in the form of an
OAuth2User is then associated to the
complete the authentication.
|Constructor and Description|
|Modifier and Type||Method and Description|
Attempts to authenticate the provided
public reactor.core.publisher.Mono<Authentication> authenticate(Authentication authentication)
Authenticationis returned. If authentication cannot be determined, an empty Mono is returned. If authentication fails, a Mono error is returned.
public final void setAuthoritiesMapper(GrantedAuthoritiesMapper authoritiesMapper)
GrantedAuthoritiesMapperused for mapping
OAuth2AuthenticatedPrincipal.getAuthorities()to a new set of authorities which will be associated to the
GrantedAuthoritiesMapperused for mapping the user's authorities