Authenticator (Apache Tomcat 9.0.22 API Documentation)

org.apache.tomcat.websocket

## Class Authenticator

- java.lang.Object
- - org.apache.tomcat.websocket.Authenticator

- Direct Known Subclasses:
    BasicAuthenticator, DigestAuthenticator

      public abstract class Authenticator
      extends java.lang.Object

  Base class for the authentication methods used by the websocket client.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Authenticator()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract java.lang.String` | `getAuthorization(java.lang.String requestUri, java.lang.String WWWAuthenticate, java.util.Map<java.lang.String,java.lang.Object> UserProperties)` Generate the authentication header that will be sent to the server.
    `abstract java.lang.String` | `getSchemeName()` Get the authentication method.
    `java.util.Map<java.lang.String,java.lang.String>` | `parseWWWAuthenticateHeader(java.lang.String WWWAuthenticate)` Utility method to parse the authentication header.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Authenticator

          public Authenticator()

  - ### Method Detail

    - #### getAuthorization

          public abstract java.lang.String getAuthorization(java.lang.String requestUri,
                                                            java.lang.String WWWAuthenticate,
                                                            java.util.Map<java.lang.String,java.lang.Object> UserProperties)
                                                     throws AuthenticationException

      Generate the authentication header that will be sent to the server.
      Parameters:
        `requestUri` - The request URI
        `WWWAuthenticate` - The server auth challenge
        `UserProperties` - The user information
      Returns:
        The auth header
      Throws:
        `AuthenticationException` - When an error occurs

    - #### getSchemeName

          public abstract java.lang.String getSchemeName()

      Get the authentication method.
      Returns:
        the auth scheme

    - #### parseWWWAuthenticateHeader

          public java.util.Map<java.lang.String,java.lang.String> parseWWWAuthenticateHeader(java.lang.String WWWAuthenticate)

      Utility method to parse the authentication header.
      Parameters:
        `WWWAuthenticate` - The server auth challenge
      Returns:
        the parsed header

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.