Package org.glassfish.tyrus.client.auth
Class AuthenticationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.glassfish.tyrus.core.HandshakeException
-
- org.glassfish.tyrus.client.auth.AuthenticationException
-
- All Implemented Interfaces:
java.io.Serializable
@Beta public class AuthenticationException extends org.glassfish.tyrus.core.HandshakeExceptionThis exception is set as a cause ofDeploymentExceptionthrown whenWebSocketContainer.connectToServer(...) fails because of any of the following:-
HTTP response status code 401 is received and ""WWW-Authenticate"" header
contains scheme which is not handled by any
Authenticatorregistered inAuthConfig. - HTTP response status code 401 is received and ""WWW-Authenticate"" header does not contain authentication scheme token or ""WWW-Authenticate"" header is missing.
-
AuthenticationExceptionis thrown fromAuthenticator.generateAuthorizationHeader(URI, String, Credentials)method. -
Property
ClientProperties.AUTH_CONFIGis not instance ofAuthConfig.
HandshakeException.getHttpStatusCode()returns always401.- Author:
- Ondrej Kosatka
- See Also:
Authenticator.generateAuthorizationHeader(URI, String, Credentials),AuthConfig, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AuthenticationException(java.lang.String message)Constructor.
-