Authenticator is called when server-side returns HTTP 401 as a reply to handshake response. Tyrus client then looks for authenticator instance registered to authentication scheme provided by server.
AuthConfig.Builder#registerAuthProvider(String, Authenticator) , ClientProperties#AUTH_CONFIG, ClientProperties#CREDENTIALS
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract String | Returns: value for Authorization header which will be put into next handshake request.Uri of the server endpoint. uri, final String "WWW-Authenticate" header value received in a handshake
response. wwwAuthenticateHeader, final Credentials credentials passed by property credentials)ClientProperties#CREDENTIALS. Can be null when there were no Credentials registered.Generate value used as "Authorization" header value for next request. |
| Authenticator | back to summary |
|---|---|
| public Authenticator() | |
| generateAuthorizationHeader | back to summary |
|---|---|
| public abstract String generateAuthorizationHeader(final URI uri, final String wwwAuthenticateHeader, final Credentials credentials) throws AuthenticationException Generate value used as "Authorization" header value for next request.
Thrown
| |