Package org.apache.tomcat.websocket
Class Authenticator
java.lang.Object
org.apache.tomcat.websocket.Authenticator
- Direct Known Subclasses:
BasicAuthenticator,DigestAuthenticator
Base class for the authentication methods used by the websocket client.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringGenerate the authentication header that will be sent to the server.abstract StringGet the authentication method.parseWWWAuthenticateHeader(String WWWAuthenticate) Utility method to parse the authentication header.
-
Constructor Details
-
Authenticator
public Authenticator()
-
-
Method Details
-
getAuthorization
public abstract String getAuthorization(String requestUri, String WWWAuthenticate, Map<String, Object> UserProperties) throws AuthenticationExceptionGenerate the authentication header that will be sent to the server.- Parameters:
requestUri- The request URIWWWAuthenticate- The server auth challengeUserProperties- The user information- Returns:
- The auth header
- Throws:
AuthenticationException- When an error occurs
-
getSchemeName
Get the authentication method.- Returns:
- the auth scheme
-
parseWWWAuthenticateHeader
Utility method to parse the authentication header.- Parameters:
WWWAuthenticate- The server auth challenge- Returns:
- the parsed header
-