Class Authenticator<T,I,S>
java.lang.Object
io.micronaut.security.authentication.Authenticator<T,I,S>
- Type Parameters:
T- Request Context TypeI- Authentication Request Identity TypeS- Authentication Request Secret Type
An Authenticator operates on several
ReactiveAuthenticationProvider instances returning the first
authenticated AuthenticationResponse.- Since:
- 1.0
- Author:
- Sergio del Amo, Graeme Rocher
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Collection<AuthenticationProvider<T,I, S>> Deprecated, for removal: This API element is subject to removal in a future version.Unused. -
Constructor Summary
ConstructorsConstructorDescriptionAuthenticator(io.micronaut.context.BeanContext beanContext, List<ReactiveAuthenticationProvider<T, I, S>> reactiveAuthenticationProviders, List<AuthenticationProvider<T, I, S>> authenticationProviders, SecurityConfiguration securityConfiguration) Authenticator(Collection<AuthenticationProvider<T, I, S>> authenticationProviders, SecurityConfiguration securityConfiguration) 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<I, S> 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,I, authenticationProvidersS>> Deprecated, 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, I, S>> reactiveAuthenticationProviders, List<AuthenticationProvider<T, I, S>> authenticationProviders, SecurityConfiguration securityConfiguration) - Parameters:
beanContext- Bean ContextreactiveAuthenticationProviders- A list of available Reactive authentication providersauthenticationProviders- A list of available imperative authentication providerssecurityConfiguration- The security configuration
-
Authenticator
@Deprecated(forRemoval=true, since="4.5.0") public Authenticator(Collection<AuthenticationProvider<T, I, S>> authenticationProviders, SecurityConfiguration securityConfiguration) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
authenticationProviders- A list of available authentication providerssecurityConfiguration- The security configuration
-
-
Method Details
-
authenticate
public org.reactivestreams.Publisher<AuthenticationResponse> authenticate(T requestContext, AuthenticationRequest<I, S> authenticationRequest) Authenticates the user with the provided credentials.- Parameters:
requestContext- The HTTP requestauthenticationRequest- Represents a request to authenticate.- Returns:
- A publisher that emits
AuthenticationResponseobjects
-
isImperativeAuthenticationProviderIsBlocking
protected boolean isImperativeAuthenticationProviderIsBlocking(AuthenticationProvider<?, ?, ?> authenticationProvider) IfExecutorAuthenticationProvider.getExecutorName()equals `blocking` or `io` returns `true`.- Returns:
- Whether any of the authentication provider is blocking.
-