Class OpenIdPasswordAuthenticationProvider
- java.lang.Object
-
- io.micronaut.security.oauth2.endpoint.token.request.password.OpenIdPasswordAuthenticationProvider
-
- All Implemented Interfaces:
io.micronaut.security.authentication.AuthenticationProvider
public class OpenIdPasswordAuthenticationProvider extends java.lang.Object implements io.micronaut.security.authentication.AuthenticationProviderAnAuthenticationProviderthat delegates to an OpenID provider using the password grant flow.- Since:
- 1.2.0
-
-
Constructor Summary
Constructors Constructor Description OpenIdPasswordAuthenticationProvider(OauthClientConfiguration clientConfiguration, OpenIdProviderMetadata openIdProviderMetadata, TokenEndpointClient tokenEndpointClient, OpenIdAuthenticationMapper openIdAuthenticationMapper, OpenIdTokenResponseValidator tokenResponseValidator)
-
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(OpenIdProviderMetadata openIdProviderMetadata)Builds the secure endpoint from the provider metadata.
-
-
-
Constructor Detail
-
OpenIdPasswordAuthenticationProvider
public OpenIdPasswordAuthenticationProvider(OauthClientConfiguration clientConfiguration, OpenIdProviderMetadata openIdProviderMetadata, TokenEndpointClient tokenEndpointClient, OpenIdAuthenticationMapper openIdAuthenticationMapper, OpenIdTokenResponseValidator tokenResponseValidator)
- Parameters:
clientConfiguration- The client configurationopenIdProviderMetadata- The provider metadatatokenEndpointClient- The token endpoint clientopenIdAuthenticationMapper- The user details mappertokenResponseValidator- The token response validator
-
-
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(OpenIdProviderMetadata openIdProviderMetadata)
Builds the secure endpoint from the provider metadata.- Parameters:
openIdProviderMetadata- The provider metadata- Returns:
- The token endpoint
-
-