Package org.apache.tomcat.websocket
Class BasicAuthenticator
- java.lang.Object
-
- org.apache.tomcat.websocket.Authenticator
-
- org.apache.tomcat.websocket.BasicAuthenticator
-
public class BasicAuthenticator extends Authenticator
Authenticator supporting the BASIC auth method.
-
-
Field Summary
Fields Modifier and Type Field Description static Stringcharsetparamstatic StringschemeName
-
Constructor Summary
Constructors Constructor Description BasicAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAuthorization(String requestUri, String WWWAuthenticate, Map<String,Object> userProperties)Generate the authentication header that will be sent to the server.StringgetSchemeName()Get the authentication method.-
Methods inherited from class org.apache.tomcat.websocket.Authenticator
parseWWWAuthenticateHeader
-
-
-
-
Field Detail
-
schemeName
public static final String schemeName
- See Also:
- Constant Field Values
-
charsetparam
public static final String charsetparam
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAuthorization
public String getAuthorization(String requestUri, String WWWAuthenticate, Map<String,Object> userProperties) throws AuthenticationException
Description copied from class:AuthenticatorGenerate the authentication header that will be sent to the server.- Specified by:
getAuthorizationin classAuthenticator- Parameters:
requestUri- The request URIWWWAuthenticate- The server auth challengeuserProperties- The user information- Returns:
- The auth header
- Throws:
AuthenticationException- When an error occurs
-
getSchemeName
public String getSchemeName()
Description copied from class:AuthenticatorGet the authentication method.- Specified by:
getSchemeNamein classAuthenticator- Returns:
- the auth scheme
-
-