@Beta public abstract class Authenticator extends Object
AuthConfig.Builder.registerAuthProvider(String, Authenticator)
,
ClientProperties.AUTH_CONFIG
,
ClientProperties.CREDENTIALS
Constructor and Description |
---|
Authenticator() |
Modifier and Type | Method and Description |
---|---|
abstract String |
generateAuthorizationHeader(URI uri,
String wwwAuthenticateHeader,
Credentials credentials)
Generate value used as "" header value for next request.
|
public abstract String generateAuthorizationHeader(URI uri, String wwwAuthenticateHeader, Credentials credentials) throws AuthenticationException
AuthenticationException
will be wrapped as DeploymentException
and thrown as a result of
WebSocketContainer
.connectToServer(...) method call.uri
- Uri of the server endpoint.wwwAuthenticateHeader
- "" header value received in a handshake
response.credentials
- credentials passed by property ClientProperties.CREDENTIALS
. Can be null
when there were no Credentials
registered.AuthenticationException
- when it is not possible to create ""
header.Copyright © 2012-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.