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:
Serializable
This exception is set as a cause of
DeploymentException
thrown when WebSocketContainer
.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
Authenticator
registered inAuthConfig
. - HTTP response status code 401 is received and ""WWW-Authenticate"" header does not contain authentication scheme token or ""WWW-Authenticate"" header is missing.
-
AuthenticationException
is thrown fromAuthenticator.generateAuthorizationHeader(URI, String, Credentials)
method. -
Property
ClientProperties.AUTH_CONFIG
is not instance ofAuthConfig
.
HandshakeException.getHttpStatusCode()
returns always 401
.
- Author:
- Ondrej Kosatka
- See Also:
-
Constructor Summary
-
Method Summary
Methods inherited from class org.glassfish.tyrus.core.HandshakeException
getHttpStatusCode
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AuthenticationException
Constructor.- Parameters:
message
- the detail message. The detail message is saved for later retrieval by theThrowable.getMessage()
method.
-