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 AuthenticationProvider
s 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 anAuthentication
from aHttpRequest
being executed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:AuthenticationFetcher
Attempts to read anAuthentication
from aHttpRequest
being executed.- Specified by:
fetchAuthentication
in interfaceAuthenticationFetcher
- Parameters:
request
-HttpRequest
being executed.- Returns:
Authentication
if found
-