Class BasicAuthAuthenticationFetcher<B>
java.lang.Object
io.micronaut.security.authentication.BasicAuthAuthenticationFetcher<B>
- Type Parameters:
B- The HTTP Request Body type
- All Implemented Interfaces:
io.micronaut.core.order.Ordered,AuthenticationFetcher<io.micronaut.http.HttpRequest<B>>
@Requires(classes=io.micronaut.http.HttpRequest.class) @Requires(property="micronaut.security.basic-auth.enabled",notEquals="false") @Requires(beans=Authenticator.class)
@Singleton
public class BasicAuthAuthenticationFetcher<B>
extends Object
implements AuthenticationFetcher<io.micronaut.http.HttpRequest<B>>
An implementation of
AuthenticationFetcher that decodes a username
and password from the Authorization header and authenticates the credentials
against any ReactiveAuthenticationProviders available.-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionBasicAuthAuthenticationFetcher(Authenticator<io.micronaut.http.HttpRequest<B>> authenticator) -
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<Authentication>fetchAuthentication(io.micronaut.http.HttpRequest<B> request) Attempts to read anAuthenticationfrom an HTTP Request being 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
public BasicAuthAuthenticationFetcher(Authenticator<io.micronaut.http.HttpRequest<B>> authenticator) - Parameters:
authenticator- The authenticator to authenticate the credentials
-
-
Method Details
-
fetchAuthentication
public org.reactivestreams.Publisher<Authentication> fetchAuthentication(io.micronaut.http.HttpRequest<B> request) Description copied from interface:AuthenticationFetcherAttempts to read anAuthenticationfrom an HTTP Request being executed.- Specified by:
fetchAuthenticationin interfaceAuthenticationFetcher<B>- Parameters:
request- an HTTP Request being executed.- Returns:
Authenticationif found
-