@Requires(property="micronaut.security.basic-auth.enabled", notEquals="false") @Singleton public class BasicAuthAuthenticationFetcher extends java.lang.Object implements AuthenticationFetcher
AuthenticationFetcher
that decodes a username
and password from the Authorization header and authenticates the credentials
against any AuthenticationProvider
s available.Constructor and Description |
---|
BasicAuthAuthenticationFetcher(Authenticator authenticator) |
Modifier and Type | Method and Description |
---|---|
org.reactivestreams.Publisher<Authentication> |
fetchAuthentication(io.micronaut.http.HttpRequest<?> request)
Attempts to read an
Authentication from a HttpRequest being executed. |
public BasicAuthAuthenticationFetcher(Authenticator authenticator)
authenticator
- The authenticator to authenticate the credentialspublic org.reactivestreams.Publisher<Authentication> fetchAuthentication(io.micronaut.http.HttpRequest<?> request)
AuthenticationFetcher
Authentication
from a HttpRequest
being executed.fetchAuthentication
in interface AuthenticationFetcher
request
- HttpRequest
being executed.Authentication
if found