Class AuthenticationHandlerUtil
java.lang.Object
org.apache.hadoop.security.authentication.server.AuthenticationHandlerUtil
This is a utility class designed to provide functionality related to
AuthenticationHandler.-
Method Summary
Modifier and TypeMethodDescriptionstatic StringcheckAuthScheme(String scheme) This method checks if the specified HTTP authenticationschemevalue is valid.static StringgetAuthenticationHandlerClassName(String authHandler) This method provides an instance ofAuthenticationHandlerbased on specifiedauthHandlerName.static booleanmatchAuthScheme(String scheme, String auth) This method checks if the specifiedauthTokenbelongs to the specified HTTP authenticationscheme.
-
Method Details
-
getAuthenticationHandlerClassName
This method provides an instance ofAuthenticationHandlerbased on specifiedauthHandlerName.- Parameters:
authHandler- The short-name (or fully qualified class name) of the authentication handler.- Returns:
- an instance of AuthenticationHandler implementation.
-
checkAuthScheme
This method checks if the specified HTTP authenticationschemevalue 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
This method checks if the specifiedauthTokenbelongs to the specified HTTP authenticationscheme.- Parameters:
scheme- HTTP authentication scheme to be checkedauth- 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.
-