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 HandshakeException
This exception is set as a cause ofDeploymentException
thrown 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
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 always401
.- Author:
- Ondrej Kosatka (ondrej.kosatka at oracle.com)
- See Also:
Authenticator.generateAuthorizationHeader(URI, String, Credentials)
,AuthConfig
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AuthenticationException(java.lang.String message)
Constructor.
-
Method Summary
-
Methods inherited from class org.glassfish.tyrus.core.HandshakeException
getHttpStatusCode
-
-