Class AuthenticationHandlerUtil

java.lang.Object
org.apache.hadoop.security.authentication.server.AuthenticationHandlerUtil

public final class AuthenticationHandlerUtil extends Object
This is a utility class designed to provide functionality related to AuthenticationHandler.
  • Method Details

    • getAuthenticationHandlerClassName

      public static String getAuthenticationHandlerClassName(String authHandler)
      This method provides an instance of AuthenticationHandler based on specified authHandlerName.
      Parameters:
      authHandler - The short-name (or fully qualified class name) of the authentication handler.
      Returns:
      an instance of AuthenticationHandler implementation.
    • checkAuthScheme

      public static String checkAuthScheme(String scheme)
      This method checks if the specified HTTP authentication scheme value is valid.
      Parameters:
      scheme - HTTP authentication scheme to be checked
      Returns:
      Canonical representation of HTTP authentication scheme
      Throws:
      IllegalArgumentException - In case the specified value is not a valid HTTP authentication scheme.
    • matchAuthScheme

      public static boolean matchAuthScheme(String scheme, String auth)
      This method checks if the specified authToken belongs to the specified HTTP authentication scheme.
      Parameters:
      scheme - HTTP authentication scheme to be checked
      auth - Authentication header value which is to be compared with the authentication scheme.
      Returns:
      true If the authentication header value corresponds to the specified authentication scheme false Otherwise.