Class OpenIdPasswordAuthenticationProvider
- java.lang.Object
-
- io.micronaut.security.oauth2.endpoint.token.request.password.OpenIdPasswordAuthenticationProvider
-
- All Implemented Interfaces:
AuthenticationProvider
public class OpenIdPasswordAuthenticationProvider extends java.lang.Object implements AuthenticationProvider
AnAuthenticationProviderthat delegates to an OpenID provider using the password grant flow.- Since:
- 1.2.0
- Author:
- James Kleeh
-
-
Constructor Summary
Constructors Constructor Description OpenIdPasswordAuthenticationProvider(OauthClientConfiguration clientConfiguration, OpenIdProviderMetadata openIdProviderMetadata, TokenEndpointClient tokenEndpointClient, OpenIdUserDetailsMapper openIdUserDetailsMapper, OpenIdTokenResponseValidator tokenResponseValidator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.reactivestreams.Publisher<AuthenticationResponse>authenticate(AuthenticationRequest authenticationRequest)Authenticates a user with the given request.protected SecureEndpointgetTokenEndpoint(OpenIdProviderMetadata openIdProviderMetadata)Builds the secure endpoint from the provider metadata
-
-
-
Constructor Detail
-
OpenIdPasswordAuthenticationProvider
public OpenIdPasswordAuthenticationProvider(OauthClientConfiguration clientConfiguration, OpenIdProviderMetadata openIdProviderMetadata, TokenEndpointClient tokenEndpointClient, OpenIdUserDetailsMapper openIdUserDetailsMapper, OpenIdTokenResponseValidator tokenResponseValidator)
- Parameters:
clientConfiguration- The client configurationopenIdProviderMetadata- The provider metadatatokenEndpointClient- The token endpoint clientopenIdUserDetailsMapper- The user details mappertokenResponseValidator- The token response validator
-
-
Method Detail
-
authenticate
public org.reactivestreams.Publisher<AuthenticationResponse> authenticate(AuthenticationRequest authenticationRequest)
Description copied from interface:AuthenticationProviderAuthenticates a user with the given request. If a successful authentication is returned, the object must be an instance ofUserDetails.- Specified by:
authenticatein interfaceAuthenticationProvider- Parameters:
authenticationRequest- The request to authenticate- Returns:
- A publisher that emits 0 or 1 responses
-
getTokenEndpoint
protected SecureEndpoint getTokenEndpoint(OpenIdProviderMetadata openIdProviderMetadata)
Builds the secure endpoint from the provider metadata- Parameters:
openIdProviderMetadata- The provider metadata- Returns:
- The token endpoint
-
-