Class HttpAuthenticator
- java.lang.Object
-
- io.quarkus.vertx.http.runtime.security.HttpAuthenticator
-
@ApplicationScoped public class HttpAuthenticator extends Object
Class that is responsible for running the HTTP based authentication
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
HttpAuthenticator.NoAuthenticationMechanism
(package private) static class
HttpAuthenticator.NoopCloseTask
-
Field Summary
Fields Modifier and Type Field Description (package private) io.quarkus.security.identity.IdentityProviderManager
identityProviderManager
(package private) HttpAuthenticationMechanism[]
mechanisms
(package private) javax.enterprise.inject.Instance<PathMatchingHttpSecurityPolicy>
pathMatchingPolicy
-
Constructor Summary
Constructors Constructor Description HttpAuthenticator()
HttpAuthenticator(javax.enterprise.inject.Instance<HttpAuthenticationMechanism> instance, javax.enterprise.inject.Instance<io.quarkus.security.identity.IdentityProvider<?>> providers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.smallrye.mutiny.Uni<io.quarkus.security.identity.SecurityIdentity>
attemptAuthentication(io.vertx.ext.web.RoutingContext routingContext)
Attempts authentication with the contents of the request.io.smallrye.mutiny.Uni<ChallengeData>
getChallenge(io.vertx.ext.web.RoutingContext routingContext)
(package private) io.quarkus.security.identity.IdentityProviderManager
getIdentityProviderManager()
io.smallrye.mutiny.Uni<Boolean>
sendChallenge(io.vertx.ext.web.RoutingContext routingContext)
-
-
-
Field Detail
-
mechanisms
final HttpAuthenticationMechanism[] mechanisms
-
identityProviderManager
@Inject io.quarkus.security.identity.IdentityProviderManager identityProviderManager
-
pathMatchingPolicy
@Inject javax.enterprise.inject.Instance<PathMatchingHttpSecurityPolicy> pathMatchingPolicy
-
-
Constructor Detail
-
HttpAuthenticator
public HttpAuthenticator()
-
HttpAuthenticator
@Inject public HttpAuthenticator(javax.enterprise.inject.Instance<HttpAuthenticationMechanism> instance, javax.enterprise.inject.Instance<io.quarkus.security.identity.IdentityProvider<?>> providers)
-
-
Method Detail
-
getIdentityProviderManager
io.quarkus.security.identity.IdentityProviderManager getIdentityProviderManager()
-
attemptAuthentication
public io.smallrye.mutiny.Uni<io.quarkus.security.identity.SecurityIdentity> attemptAuthentication(io.vertx.ext.web.RoutingContext routingContext)
Attempts authentication with the contents of the request. If this is possible the Uni will resolve to a valid SecurityIdentity when it is subscribed to. Note that Uni is lazy, so this may not happen until the Uni is subscribed to.If invalid credentials are present then the completion stage will resolve to a
AuthenticationFailedException
If no credentials are present it will resolve to null.
-
sendChallenge
public io.smallrye.mutiny.Uni<Boolean> sendChallenge(io.vertx.ext.web.RoutingContext routingContext)
- Returns:
-
getChallenge
public io.smallrye.mutiny.Uni<ChallengeData> getChallenge(io.vertx.ext.web.RoutingContext routingContext)
-
-