Class HeaderBasedAuthenticationMechanism

java.lang.Object
io.stargate.sgv2.api.common.security.HeaderBasedAuthenticationMechanism
All Implemented Interfaces:
io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism

public class HeaderBasedAuthenticationMechanism extends Object implements io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism
Implementation of the HttpAuthenticationMechanism that authenticates on a header. If a target header exists, request is considered as authenticated.
See Also:
  • 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 inherited from interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism

    DEFAULT_PRIORITY
  • Constructor Summary

    Constructors
    Constructor
    Description
    HeaderBasedAuthenticationMechanism(String headerName, javax.enterprise.inject.Instance<ChallengeSender> customChallengeSender)
     
  • Method Summary

    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)
    io.smallrye.mutiny.Uni<io.quarkus.vertx.http.runtime.security.ChallengeData>
    getChallenge(io.vertx.ext.web.RoutingContext context)
    io.smallrye.mutiny.Uni<io.quarkus.vertx.http.runtime.security.HttpCredentialTransport>
    getCredentialTransport(io.vertx.ext.web.RoutingContext context)
    Set<Class<? extends io.quarkus.security.identity.request.AuthenticationRequest>>
    io.smallrye.mutiny.Uni<Boolean>
    sendChallenge(io.vertx.ext.web.RoutingContext context)

    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, getPriority
  • Constructor Details

    • HeaderBasedAuthenticationMechanism

      public HeaderBasedAuthenticationMechanism(String headerName, javax.enterprise.inject.Instance<ChallengeSender> customChallengeSender)
  • 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 interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism
    • 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
    • sendChallenge

      public io.smallrye.mutiny.Uni<Boolean> sendChallenge(io.vertx.ext.web.RoutingContext context)

      Writes a custom response.

      Specified by:
      sendChallenge 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.smallrye.mutiny.Uni<io.quarkus.vertx.http.runtime.security.HttpCredentialTransport> getCredentialTransport(io.vertx.ext.web.RoutingContext context)
      Specified by:
      getCredentialTransport in interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism