Class BasicAuthenticationMechanism

    • Field Detail

      • USER_AGENT_CHARSETS

        public static final String USER_AGENT_CHARSETS
        A comma separated list of patterns and charsets. The pattern is a regular expression. Because different browsers user different encodings this allows for the correct encoding to be selected based on the current browser. In general though it is recommended that BASIC auth not be used when passwords contain characters outside ASCII, as some browsers use the current locate to determine encoding. This list must have an even number of elements, as it is interpreted as pattern,charset,pattern,charset,...
        See Also:
        Constant Field Values
    • Constructor Detail

      • BasicAuthenticationMechanism

        public BasicAuthenticationMechanism​(String realmName)
      • BasicAuthenticationMechanism

        public BasicAuthenticationMechanism​(String realmName,
                                            boolean silent)
      • BasicAuthenticationMechanism

        public BasicAuthenticationMechanism​(String realmName,
                                            boolean silent,
                                            Charset charset,
                                            Map<Pattern,​Charset> userAgentCharsets)
      • BasicAuthenticationMechanism

        @Deprecated
        public BasicAuthenticationMechanism​(String realmName,
                                            String mechanismName)
        Deprecated.
      • BasicAuthenticationMechanism

        @Deprecated
        public BasicAuthenticationMechanism​(String realmName,
                                            String mechanismName,
                                            boolean silent)
        Deprecated.
    • 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)
        Specified by:
        authenticate in interface HttpAuthenticationMechanism
      • 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 interface HttpAuthenticationMechanism
      • 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 highest priority gets the first chance to send a challenge. The default priority is equal to 1000.
        Specified by:
        getPriority in interface HttpAuthenticationMechanism
        Returns:
        priority