public class OauthPasswordAuthenticationProvider
extends java.lang.Object
implements io.micronaut.security.authentication.AuthenticationProvider
AuthenticationProvider that delegates to an OAuth 2.0 provider using the
password grant flow.| Constructor and Description |
|---|
OauthPasswordAuthenticationProvider(TokenEndpointClient tokenEndpointClient,
OauthClientConfiguration clientConfiguration,
OauthAuthenticationMapper authenticationMapper) |
| Modifier and Type | Method and Description |
|---|---|
org.reactivestreams.Publisher<io.micronaut.security.authentication.AuthenticationResponse> |
authenticate(io.micronaut.http.HttpRequest<?> httpRequest,
io.micronaut.security.authentication.AuthenticationRequest<?,?> authenticationRequest) |
protected SecureEndpoint |
getTokenEndpoint(OauthClientConfiguration clientConfiguration)
Builds the secure endpoint from the client configuration.
|
public OauthPasswordAuthenticationProvider(TokenEndpointClient tokenEndpointClient, OauthClientConfiguration clientConfiguration, OauthAuthenticationMapper authenticationMapper)
tokenEndpointClient - The token endpoint clientclientConfiguration - The client configurationauthenticationMapper - The user details mapperpublic org.reactivestreams.Publisher<io.micronaut.security.authentication.AuthenticationResponse> authenticate(io.micronaut.http.HttpRequest<?> httpRequest,
io.micronaut.security.authentication.AuthenticationRequest<?,?> authenticationRequest)
authenticate in interface io.micronaut.security.authentication.AuthenticationProviderprotected SecureEndpoint getTokenEndpoint(OauthClientConfiguration clientConfiguration)
clientConfiguration - The client configuration