Class BasicAuthAuthenticationFetcher
java.lang.Object
io.micronaut.security.authentication.BasicAuthAuthenticationFetcher
- All Implemented Interfaces:
io.micronaut.core.order.Ordered,AuthenticationFetcher
@Requires(property="micronaut.security.basic-auth.enabled",
notEquals="false")
@Singleton
public class BasicAuthAuthenticationFetcher
extends Object
implements AuthenticationFetcher
An implementation of
AuthenticationFetcher that decodes a username
and password from the Authorization header and authenticates the credentials
against any AuthenticationProviders available.-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<Authentication>fetchAuthentication(io.micronaut.http.HttpRequest<?> request) Attempts to read anAuthenticationfrom aHttpRequestbeing executed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.order.Ordered
getOrder
-
Constructor Details
-
BasicAuthAuthenticationFetcher
- Parameters:
authenticator- The authenticator to authenticate the credentials
-
-
Method Details
-
fetchAuthentication
public org.reactivestreams.Publisher<Authentication> fetchAuthentication(io.micronaut.http.HttpRequest<?> request) Description copied from interface:AuthenticationFetcherAttempts to read anAuthenticationfrom aHttpRequestbeing executed.- Specified by:
fetchAuthenticationin interfaceAuthenticationFetcher- Parameters:
request-HttpRequestbeing executed.- Returns:
Authenticationif found
-