Class Authenticator<T>
java.lang.Object
io.micronaut.security.authentication.Authenticator<T>
- Type Parameters:
- T- Request Context Type
An Authenticator operates on several 
ReactiveAuthenticationProvider instances returning the first
 authenticated AuthenticationResponse.- Since:
- 1.0
- Author:
- Sergio del Amo, Graeme Rocher
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final Collection<AuthenticationProvider<T>>Deprecated, for removal: This API element is subject to removal in a future version.Unused.
- 
Constructor SummaryConstructorsConstructorDescriptionAuthenticator(io.micronaut.context.BeanContext beanContext, List<ReactiveAuthenticationProvider<T, ?, ?>> reactiveAuthenticationProviders, List<AuthenticationProvider<T, ?, ?>> authenticationProviders, SecurityConfiguration securityConfiguration) Deprecated.Authenticator(io.micronaut.context.BeanContext beanContext, List<ReactiveAuthenticationProvider<T, ?, ?>> reactiveAuthenticationProviders, List<AuthenticationProvider<T, ?, ?>> authenticationProviders, List<AuthenticationProvider<T>> deprecatedAuthenticationProviders, SecurityConfiguration securityConfiguration) Authenticator(Collection<AuthenticationProvider<T>> deprecatedAuthenticationProviders, SecurityConfiguration securityConfiguration) Deprecated, for removal: This API element is subject to removal in a future version.
- 
Method SummaryModifier and TypeMethodDescriptionorg.reactivestreams.Publisher<AuthenticationResponse>authenticate(T requestContext, AuthenticationRequest<?, ?> authenticationRequest) Authenticates the user with the provided credentials.protected booleanisImperativeAuthenticationProviderIsBlocking(AuthenticationProvider<?, ?, ?> authenticationProvider) IfExecutorAuthenticationProvider.getExecutorName()equals `blocking` or `io` returns `true`.
- 
Field Details- 
authenticationProviders@Deprecated(forRemoval=true, since="4.5.0") protected final Collection<AuthenticationProvider<T>> authenticationProvidersDeprecated, for removal: This API element is subject to removal in a future version.Unused. To be removed in the next major version.
 
- 
- 
Constructor Details- 
Authenticator@Inject public Authenticator(io.micronaut.context.BeanContext beanContext, List<ReactiveAuthenticationProvider<T, ?, ?>> reactiveAuthenticationProviders, List<AuthenticationProvider<T, ?, ?>> authenticationProviders, List<AuthenticationProvider<T>> deprecatedAuthenticationProviders, SecurityConfiguration securityConfiguration) - Parameters:
- beanContext- Bean Context
- reactiveAuthenticationProviders- A list of available Reactive authentication providers
- authenticationProviders- A list of available imperative authentication providers
- deprecatedAuthenticationProviders- A list of available deprecated authentication providers
- securityConfiguration- The security configuration
 
- 
Authenticatorpublic Authenticator(io.micronaut.context.BeanContext beanContext, List<ReactiveAuthenticationProvider<T, ?, ?>> reactiveAuthenticationProviders, List<AuthenticationProvider<T, ?, ?>> authenticationProviders, SecurityConfiguration securityConfiguration) Deprecated.- Parameters:
- beanContext- Bean Context
- reactiveAuthenticationProviders- A list of available Reactive authentication providers
- authenticationProviders- A list of available imperative authentication providers
- securityConfiguration- The security configuration
 
- 
Authenticator@Deprecated(forRemoval=true, since="4.5.0") public Authenticator(Collection<AuthenticationProvider<T>> deprecatedAuthenticationProviders, SecurityConfiguration securityConfiguration) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
- deprecatedAuthenticationProviders- A list of available authentication providers
- securityConfiguration- The security configuration
 
 
- 
- 
Method Details- 
authenticatepublic org.reactivestreams.Publisher<AuthenticationResponse> authenticate(T requestContext, AuthenticationRequest<?, ?> authenticationRequest) Authenticates the user with the provided credentials.- Parameters:
- requestContext- The HTTP request
- authenticationRequest- Represents a request to authenticate.
- Returns:
- A publisher that emits AuthenticationResponseobjects
 
- 
isImperativeAuthenticationProviderIsBlockingprotected boolean isImperativeAuthenticationProviderIsBlocking(AuthenticationProvider<?, ?, ?> authenticationProvider) IfExecutorAuthenticationProvider.getExecutorName()equals `blocking` or `io` returns `true`.- Parameters:
- authenticationProvider- An authentication provider
- Returns:
- Whether any of the authentication provider is blocking.
 
 
-