Top Description Fields Constructors Methods
org.apache.tomcat.websocket

public Class BasicAuthenticator

extends Authenticator
Class Inheritance
Imports
java.nio.charset.Charset, .StandardCharsets, java.util.Base64, .Map

Authenticator supporting the BASIC authentication method.

Field Summary

Modifier and TypeField and Description
public static final String
public static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
getAuthorization(String
The request URI
requestUri
,
String
The server authentication header received
authenticateHeader
,
String
The user name
userName
,
String
The user password
userPassword
,
String
The realm for which the provided user name and password are valid. null to indicate all realms.
userRealm
)

Implements abstract org.apache.tomcat.websocket.Authenticator.getAuthorization.

Generate the authorization header value that will be sent to the server.

public String
getSchemeName()

Implements abstract org.apache.tomcat.websocket.Authenticator.getSchemeName.

Get the authentication method.

Inherited from org.apache.tomcat.websocket.Authenticator:
parseAuthenticateHeadervalidatePasswordvalidateRealmvalidateUsername

Field Detail

charsetparamback to summary
public static final String charsetparam
schemeNameback to summary
public static final String schemeName

Constructor Detail

BasicAuthenticatorback to summary
public BasicAuthenticator()

Method Detail

getAuthorizationback to summary
public String getAuthorization(String requestUri, String authenticateHeader, String userName, String userPassword, String userRealm) throws AuthenticationException

Implements abstract org.apache.tomcat.websocket.Authenticator.getAuthorization.

Doc from org.apache.tomcat.websocket.Authenticator.getAuthorization.

Generate the authorization header value that will be sent to the server.

Parameters
requestUri:String

The request URI

authenticateHeader:String

The server authentication header received

userName:String

The user name

userPassword:String

The user password

userRealm:String

The realm for which the provided user name and password are valid. null to indicate all realms.

Returns:String

The generated authorization header value

Annotations
@Override
Exceptions
AuthenticationException:
When an error occurs
getSchemeNameback to summary
public String getSchemeName()

Implements abstract org.apache.tomcat.websocket.Authenticator.getSchemeName.

Doc from org.apache.tomcat.websocket.Authenticator.getSchemeName.

Get the authentication method.

Returns:String

the authentication scheme

Annotations
@Override