Class Authenticator

    • Constructor Summary

      Constructors 
      Constructor Description
      Authenticator()  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract java.lang.String generateAuthorizationHeader​(java.net.URI uri, java.lang.String wwwAuthenticateHeader, Credentials credentials)
      Generate value used as ""Authorization"" header value for next request.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Authenticator

        public Authenticator()
    • Method Detail

      • generateAuthorizationHeader

        public abstract java.lang.String generateAuthorizationHeader​(java.net.URI uri,
                                                                     java.lang.String wwwAuthenticateHeader,
                                                                     Credentials credentials)
                                                              throws AuthenticationException
        Generate value used as ""Authorization"" header value for next request.

        Thrown AuthenticationException will be wrapped as DeploymentException and thrown as a result of WebSocketContainer.connectToServer(...) method call.

        Parameters:
        uri - Uri of the server endpoint.
        wwwAuthenticateHeader - ""WWW-Authenticate"" header value received in a handshake response.
        credentials - credentials passed by property ClientProperties.CREDENTIALS. Can be null when there were no Credentials registered.
        Returns:
        value for "Authorization" header which will be put into next handshake request.
        Throws:
        AuthenticationException - when it is not possible to create ""Authorization"" header.