Freigeben über


ClientAuthenticationException Class

public class ClientAuthenticationException
extends HttpResponseException

The ClientAuthenticationException represents an exception thrown when client authentication fails with a status code of 4XX, typically 401 unauthorized.

This exception is thrown in the following scenarios:

  • The client did not send the required authorization credentials to access the requested resource, i.e., the Authorization HTTP header is missing in the request.
  • The request contains the HTTP Authorization header, but authorization has been refused for the credentials contained in the request header.

Constructor Summary

Constructor Description
ClientAuthenticationException(String message, HttpResponse response)

Initializes a new instance of the ClientAuthenticationException class.

ClientAuthenticationException(String message, HttpResponse response, Object value)

Initializes a new instance of the ClientAuthenticationException class.

ClientAuthenticationException(String message, HttpResponse response, Throwable cause)

Initializes a new instance of the ClientAuthenticationException class.

Methods inherited from HttpResponseException

Methods inherited from java.lang.Object

Methods inherited from java.lang.Throwable

Constructor Details

ClientAuthenticationException

public ClientAuthenticationException(String message, HttpResponse response)

Initializes a new instance of the ClientAuthenticationException class.

Parameters:

message - The exception message or the response content if a message is not available.
response - The HTTP response with the authorization failure.

ClientAuthenticationException

public ClientAuthenticationException(String message, HttpResponse response, Object value)

Initializes a new instance of the ClientAuthenticationException class.

Parameters:

message - The exception message or the response content if a message is not available.
response - The HTTP response with the authorization failure.
value - The deserialized HTTP response value.

ClientAuthenticationException

public ClientAuthenticationException(String message, HttpResponse response, Throwable cause)

Initializes a new instance of the ClientAuthenticationException class.

Parameters:

message - The exception message or the response content if a message is not available.
response - The HTTP response with the authorization failure.
cause - The Throwable which caused the creation of this exception.

Applies to