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>

public class OpenIdPasswordAuthenticationProvider<T> extends Object implements AuthenticationProvider<T>
An AuthenticationProvider that delegates to an OpenID provider using the password grant flow.
Since:
1.2.0
Author:
James Kleeh
  • Constructor Details

  • Method Details

    • authenticate

      public org.reactivestreams.Publisher<AuthenticationResponse> authenticate(T requestContext, AuthenticationRequest<?,?> authenticationRequest)
      Description copied from interface: AuthenticationProvider
      Authenticates a user with the given request. If a successful authentication is returned, the object must be an instance of Authentication. 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 interface AuthenticationProvider<T>
      Parameters:
      requestContext - The http request
      authenticationRequest - The credentials 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