Class OAuth2AuthMechanism

  • All Implemented Interfaces:
    io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism

    @ApplicationScoped
    public class OAuth2AuthMechanism
    extends Object
    implements io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism
    An AuthenticationMechanism that validates a caller based on a bearer token
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism

        io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism.ChallengeSender
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static io.quarkus.vertx.http.runtime.security.ChallengeData CHALLENGE_DATA  
      • Fields inherited from interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism

        DEFAULT_PRIORITY
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.smallrye.mutiny.Uni<io.quarkus.security.identity.SecurityIdentity> authenticate​(io.vertx.ext.web.RoutingContext context, io.quarkus.security.identity.IdentityProviderManager identityProviderManager)
      Extract the Authorization header and validate the bearer token if it exists.
      io.smallrye.mutiny.Uni<io.quarkus.vertx.http.runtime.security.ChallengeData> getChallenge​(io.vertx.ext.web.RoutingContext context)  
      io.quarkus.vertx.http.runtime.security.HttpCredentialTransport getCredentialTransport()  
      Set<Class<? extends io.quarkus.security.identity.request.AuthenticationRequest>> getCredentialTypes()  
      • Methods inherited from interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism

        getCredentialTransport, getPriority, sendChallenge
    • Field Detail

      • CHALLENGE_DATA

        protected static final io.quarkus.vertx.http.runtime.security.ChallengeData CHALLENGE_DATA
    • Constructor Detail

      • OAuth2AuthMechanism

        public OAuth2AuthMechanism()
    • Method Detail

      • authenticate

        public io.smallrye.mutiny.Uni<io.quarkus.security.identity.SecurityIdentity> authenticate​(io.vertx.ext.web.RoutingContext context,
                                                                                                  io.quarkus.security.identity.IdentityProviderManager identityProviderManager)
        Extract the Authorization header and validate the bearer token if it exists. If it does, and is validated, this builds the org.jboss.security.SecurityContext authenticated Subject that drives the container APIs as well as the authorization layers.
        Specified by:
        authenticate in interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism
        Parameters:
        context - - the http request exchange object
        identityProviderManager - - the current security context that
        Returns:
        one of AUTHENTICATED, NOT_AUTHENTICATED or NOT_ATTEMPTED depending on the header and authentication outcome.
      • getChallenge

        public io.smallrye.mutiny.Uni<io.quarkus.vertx.http.runtime.security.ChallengeData> getChallenge​(io.vertx.ext.web.RoutingContext context)
        Specified by:
        getChallenge in interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism
      • getCredentialTypes

        public Set<Class<? extends io.quarkus.security.identity.request.AuthenticationRequest>> getCredentialTypes()
        Specified by:
        getCredentialTypes in interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism
      • getCredentialTransport

        public io.quarkus.vertx.http.runtime.security.HttpCredentialTransport getCredentialTransport()
        Specified by:
        getCredentialTransport in interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism