Package org.apache.tomcat.websocket
Class DigestAuthenticator
- java.lang.Object
-
- org.apache.tomcat.websocket.Authenticator
-
- org.apache.tomcat.websocket.DigestAuthenticator
-
public class DigestAuthenticator extends Authenticator
Authenticator supporting the DIGEST authentication method.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
schemeName
-
Constructor Summary
Constructors Constructor Description DigestAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAuthorization(java.lang.String requestUri, java.lang.String authenticateHeader, java.lang.String userName, java.lang.String userPassword, java.lang.String userRealm)
Generate the authorization header value that will be sent to the server.java.lang.String
getSchemeName()
Get the authentication method.-
Methods inherited from class org.apache.tomcat.websocket.Authenticator
getAuthorization, parseAuthenticateHeader, parseWWWAuthenticateHeader, validatePassword, validateRealm, validateUsername
-
-
-
-
Field Detail
-
schemeName
public static final java.lang.String schemeName
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAuthorization
public java.lang.String getAuthorization(java.lang.String requestUri, java.lang.String authenticateHeader, java.lang.String userName, java.lang.String userPassword, java.lang.String userRealm) throws AuthenticationException
Description copied from class:Authenticator
Generate the authorization header value that will be sent to the server.- Specified by:
getAuthorization
in classAuthenticator
- Parameters:
requestUri
- The request URIauthenticateHeader
- The server authentication header receiveduserName
- The user nameuserPassword
- The user passworduserRealm
- The realm for which the provided user name and password are valid.null
to indicate all realms.- Returns:
- The generated authorization header value
- Throws:
AuthenticationException
- When an error occurs
-
getSchemeName
public java.lang.String getSchemeName()
Description copied from class:Authenticator
Get the authentication method.- Specified by:
getSchemeName
in classAuthenticator
- Returns:
- the authentication scheme
-
-