Class OpenIdPasswordAuthenticationProvider<T>
java.lang.Object
io.micronaut.security.oauth2.endpoint.token.request.password.OpenIdPasswordAuthenticationProvider<T>
- Type Parameters:
T
- Request Context Type
- All Implemented Interfaces:
AuthenticationProvider<T>
@Deprecated(since="4.8.0",
forRemoval=true)
public class OpenIdPasswordAuthenticationProvider<T>
extends Object
implements AuthenticationProvider<T>
Deprecated, for removal: This API element is subject to removal in a future version.
An
AuthenticationProvider
that delegates to an OpenID provider using the
password grant flow.- Since:
- 1.2.0
- Author:
- James Kleeh
-
Constructor Summary
ConstructorDescriptionOpenIdPasswordAuthenticationProvider
(OauthClientConfiguration clientConfiguration, OpenIdProviderMetadata openIdProviderMetadata, TokenEndpointClient tokenEndpointClient, OpenIdAuthenticationMapper openIdAuthenticationMapper, OpenIdTokenResponseValidator tokenResponseValidator) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<AuthenticationResponse>
authenticate
(T requestContext, AuthenticationRequest<?, ?> authenticationRequest) Deprecated, for removal: This API element is subject to removal in a future version.Authenticates a user with the given request.protected SecureEndpoint
getTokenEndpoint
(OpenIdProviderMetadata openIdProviderMetadata) Deprecated, for removal: This API element is subject to removal in a future version.Builds the secure endpoint from the provider metadata.
-
Constructor Details
-
OpenIdPasswordAuthenticationProvider
public OpenIdPasswordAuthenticationProvider(OauthClientConfiguration clientConfiguration, OpenIdProviderMetadata openIdProviderMetadata, TokenEndpointClient tokenEndpointClient, OpenIdAuthenticationMapper openIdAuthenticationMapper, OpenIdTokenResponseValidator tokenResponseValidator) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
clientConfiguration
- The client configurationopenIdProviderMetadata
- The provider metadatatokenEndpointClient
- The token endpoint clientopenIdAuthenticationMapper
- The user details mappertokenResponseValidator
- The token response validator
-
-
Method Details
-
authenticate
public org.reactivestreams.Publisher<AuthenticationResponse> authenticate(T requestContext, AuthenticationRequest<?, ?> authenticationRequest) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AuthenticationProvider
Authenticates a user with the given request. If a successful authentication is returned, the object must be an instance ofAuthentication
. Publishers MUST emit cold observables! This method will be called for all authenticators for each authentication request and it is assumed no work will be done until the publisher is subscribed to.- Specified by:
authenticate
in interfaceAuthenticationProvider<T>
- Parameters:
requestContext
- The http requestauthenticationRequest
- The credentials to authenticate- Returns:
- A publisher that emits 0 or 1 responses
-
getTokenEndpoint
Deprecated, for removal: This API element is subject to removal in a future version.Builds the secure endpoint from the provider metadata.- Parameters:
openIdProviderMetadata
- The provider metadata- Returns:
- The token endpoint
-
ReactiveOpenIdPasswordAuthenticationProvider
instead.