public class OauthPasswordAuthenticationProvider extends java.lang.Object implements AuthenticationProvider
AuthenticationProvider that delegates to an OAuth 2.0 provider using the
password grant flow.| Constructor and Description |
|---|
OauthPasswordAuthenticationProvider(TokenEndpointClient tokenEndpointClient,
OauthClientConfiguration clientConfiguration,
OauthUserDetailsMapper userDetailsMapper) |
| Modifier and Type | Method and Description |
|---|---|
org.reactivestreams.Publisher<AuthenticationResponse> |
authenticate(AuthenticationRequest authenticationRequest)
Authenticates a user with the given request.
|
protected SecureEndpoint |
getTokenEndpoint(OauthClientConfiguration clientConfiguration)
Builds the secure endpoint from the client configuration
|
public OauthPasswordAuthenticationProvider(TokenEndpointClient tokenEndpointClient, OauthClientConfiguration clientConfiguration, OauthUserDetailsMapper userDetailsMapper)
tokenEndpointClient - The token endpoint clientclientConfiguration - The client configurationuserDetailsMapper - The user details mapperpublic org.reactivestreams.Publisher<AuthenticationResponse> authenticate(AuthenticationRequest authenticationRequest)
AuthenticationProviderUserDetails.authenticate in interface AuthenticationProviderauthenticationRequest - The request to authenticateprotected SecureEndpoint getTokenEndpoint(OauthClientConfiguration clientConfiguration)
clientConfiguration - The client configuration