Class OauthPasswordAuthenticationProvider
- java.lang.Object
-
- io.micronaut.security.oauth2.endpoint.token.request.password.OauthPasswordAuthenticationProvider
-
- All Implemented Interfaces:
io.micronaut.security.authentication.AuthenticationProvider
public class OauthPasswordAuthenticationProvider extends java.lang.Object implements io.micronaut.security.authentication.AuthenticationProviderAnAuthenticationProviderthat delegates to an OAuth 2.0 provider using the password grant flow.- Since:
- 1.2.0
-
-
Constructor Summary
Constructors Constructor Description OauthPasswordAuthenticationProvider(TokenEndpointClient tokenEndpointClient, OauthClientConfiguration clientConfiguration, OauthAuthenticationMapper authenticationMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.reactivestreams.Publisher<io.micronaut.security.authentication.AuthenticationResponse>authenticate(io.micronaut.http.HttpRequest<?> httpRequest, io.micronaut.security.authentication.AuthenticationRequest<?,?> authenticationRequest)protected SecureEndpointgetTokenEndpoint(OauthClientConfiguration clientConfiguration)Builds the secure endpoint from the client configuration.
-
-
-
Constructor Detail
-
OauthPasswordAuthenticationProvider
public OauthPasswordAuthenticationProvider(TokenEndpointClient tokenEndpointClient, OauthClientConfiguration clientConfiguration, OauthAuthenticationMapper authenticationMapper)
- Parameters:
tokenEndpointClient- The token endpoint clientclientConfiguration- The client configurationauthenticationMapper- The user details mapper
-
-
Method Detail
-
authenticate
public org.reactivestreams.Publisher<io.micronaut.security.authentication.AuthenticationResponse> authenticate(io.micronaut.http.HttpRequest<?> httpRequest, io.micronaut.security.authentication.AuthenticationRequest<?,?> authenticationRequest)- Specified by:
authenticatein interfaceio.micronaut.security.authentication.AuthenticationProvider
-
getTokenEndpoint
protected SecureEndpoint getTokenEndpoint(OauthClientConfiguration clientConfiguration)
Builds the secure endpoint from the client configuration.- Parameters:
clientConfiguration- The client configuration- Returns:
- The token endpoint
-
-