checkCredentials(String, String)
which is called to verify each incoming request.
| Modifier and Type | Field and Description |
|---|---|
| private final Charset | |
| private final boolean | |
| protected final String | realm
The HTTP Basic authentication realm. |
| Access | Constructor and Description |
|---|---|
| public | BasicAuthenticator(String
the HTTP Basic authentication realm realm)Creates a |
| public | BasicAuthenticator(String
the HTTP Basic authentication realm realm, Charset the charset)Charset to decode incoming credentials from the clientCreates a |
| Modifier and Type | Method and Description |
|---|---|
| public Authenticator. | authenticate(HttpExchange t)
Implements abstract com. Called to authenticate each incoming request. |
| public abstract boolean | Returns: true if the credentials are valid, false otherwisethe username from the request username, String the password from the request password)Called for each incoming request to verify the given name and password in the context of this authenticator's realm. |
| public String | Returns: the authenticator's realm stringReturns the realm this |
| private void |
| charset | back to summary |
|---|---|
| private final Charset charset | |
| isUTF8 | back to summary |
|---|---|
| private final boolean isUTF8 | |
| realm | back to summary |
|---|---|
| protected final String realm The HTTP Basic authentication realm. | |
| BasicAuthenticator | back to summary |
|---|---|
| public BasicAuthenticator(String realm) Creates a API Note The value of the
| |
| BasicAuthenticator | back to summary |
|---|---|
| public BasicAuthenticator(String realm, Charset charset) Creates a API Note
The value of the
| |
| authenticate | back to summary |
|---|---|
| public Authenticator. Implements abstract com. Doc from com. Called to authenticate each incoming request. The implementation
must return a
| |
| checkCredentials | back to summary |
|---|---|
| public abstract boolean checkCredentials(String username, String password) Called for each incoming request to verify the given name and password in the context of this authenticator's realm. Any caching of credentials must be done by the implementation of this method. | |
| getRealm | back to summary |
|---|---|
| public String getRealm() Returns the realm this
| |
| setAuthHeader | back to summary |
|---|---|
| private void setAuthHeader(HttpExchange t) | |