Class BasicAuthenticationMechanism
java.lang.Object
io.quarkus.vertx.http.runtime.security.BasicAuthenticationMechanism
- All Implemented Interfaces:
HttpAuthenticationMechanism
@Singleton
public class BasicAuthenticationMechanism
extends Object
implements HttpAuthenticationMechanism
The authentication handler responsible for BASIC authentication as described by RFC2617
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism
HttpAuthenticationMechanism.ChallengeSender
-
Field Summary
Fields inherited from interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism
DEFAULT_PRIORITY
-
Constructor Summary
ConstructorsConstructorDescriptionBasicAuthenticationMechanism
(HttpConfiguration runtimeConfig, HttpBuildTimeConfig buildTimeConfig) BasicAuthenticationMechanism
(String realmName) BasicAuthenticationMechanism
(String realmName, boolean silent) BasicAuthenticationMechanism
(String realmName, boolean silent, Charset charset, Map<Pattern, Charset> userAgentCharsets) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<io.quarkus.security.identity.SecurityIdentity>
authenticate
(io.vertx.ext.web.RoutingContext context, io.quarkus.security.identity.IdentityProviderManager identityProviderManager) io.smallrye.mutiny.Uni<ChallengeData>
getChallenge
(io.vertx.ext.web.RoutingContext context) io.smallrye.mutiny.Uni<HttpCredentialTransport>
getCredentialTransport
(io.vertx.ext.web.RoutingContext context) The credential transport, used for finding the best candidate for authenticating and challenging when more than one mechanism is installed.Returns the required credential types.int
Returns a priority which determines in which order HttpAuthenticationMechanisms handle the authentication and challenge requests when it is not possible to select the best candidate authentication mechanism based on the request credentials or path specific configuration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism
getCredentialTransport, sendChallenge
-
Constructor Details
-
BasicAuthenticationMechanism
@Inject BasicAuthenticationMechanism(HttpConfiguration runtimeConfig, HttpBuildTimeConfig buildTimeConfig) -
BasicAuthenticationMechanism
-
BasicAuthenticationMechanism
-
BasicAuthenticationMechanism
-
-
Method Details
-
authenticate
public io.smallrye.mutiny.Uni<io.quarkus.security.identity.SecurityIdentity> authenticate(io.vertx.ext.web.RoutingContext context, io.quarkus.security.identity.IdentityProviderManager identityProviderManager) - Specified by:
authenticate
in interfaceHttpAuthenticationMechanism
-
getChallenge
- Specified by:
getChallenge
in interfaceHttpAuthenticationMechanism
-
getCredentialTypes
public Set<Class<? extends io.quarkus.security.identity.request.AuthenticationRequest>> getCredentialTypes()Description copied from interface:HttpAuthenticationMechanism
Returns the required credential types. If there are no identity managers installed that support the listed types then this mechanism will not be enabled.- Specified by:
getCredentialTypes
in interfaceHttpAuthenticationMechanism
-
getCredentialTransport
public io.smallrye.mutiny.Uni<HttpCredentialTransport> getCredentialTransport(io.vertx.ext.web.RoutingContext context) Description copied from interface:HttpAuthenticationMechanism
The credential transport, used for finding the best candidate for authenticating and challenging when more than one mechanism is installed. May be null if this mechanism cannot interfere with other mechanisms- Specified by:
getCredentialTransport
in interfaceHttpAuthenticationMechanism
-
getPriority
public int getPriority()Description copied from interface:HttpAuthenticationMechanism
Returns a priority which determines in which order HttpAuthenticationMechanisms handle the authentication and challenge requests when it is not possible to select the best candidate authentication mechanism based on the request credentials or path specific configuration. Multiple mechanisms are sorted in descending order, so the highest priority gets the first chance to send a challenge. The default priority is equal to 1000.- Specified by:
getPriority
in interfaceHttpAuthenticationMechanism
- Returns:
- priority
-