com.unboundid.directory.sdk.http.types
Class AuthenticationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.unboundid.directory.sdk.http.types.AuthenticationException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AttributeCreateDeniedAuthenticationException, BadCredentialsAuthenticationException, CredentialsExpiredAuthenticationException, InternalAuthenticationException, InvalidClientAuthenticationException, InvalidIdentityProviderAuthenticationException, InvalidRequestAuthenticationException, InvalidResourceAuthenticationException, OAuth2AuthenticationException, ResourceConflictAuthenticationException, UserDisabledAuthenticationException, UserLockedAuthenticationException

public abstract class AuthenticationException
extends java.lang.Exception

Base abstract class for all exceptions that result in a HTTP authentication failure.

See Also:
Serialized Form

Field Summary
static java.lang.String ATTRIBUTE_CREATE_DENIED
          Error code used to indicate authentication failed because policy denied one or more attributes in the registration data.
static java.lang.String BAD_CREDENTIALS
          Error code used to indicate authentication failed because the provided credentials are not valid.
static java.lang.String CREDENTIALS_EXPIRED
          Error code used to indicate authentication failed because the user's credentials have expired.
static java.lang.String INTERNAL_ERROR
          Error code used to indicate authentication failed due to a internal error.
static java.lang.String INVALID_CLIENT
          Error code used to indicate authentication failed because the request included an invalid client ID.
static java.lang.String INVALID_IDENTITY_PROVIDER
          Error code used to indicate authentication failed because invalid identity provider is specified.
static java.lang.String INVALID_REQUEST
          Error code used to indicate authentication failed because the request is invalid.
static java.lang.String INVALID_RESOURCE
          Error code used to indicate authentication failed because registration request included an invalid registration data.
static java.lang.String OAUTH2_ERROR
          Error code used to indicate authentication failed with an external identity provider while performing the OAuth 2 flow.
static java.lang.String RESOURCE_CONFLICT
          Error code used to indicate registration failed because the user account conflicts with an already existing one.
static java.lang.String USER_DISABLED
          Error code used to indicate authentication failed because the user account is disabled.
static java.lang.String USER_LOCKED
          Error code used to indicate authentication failed because the user account is locked.
 
Constructor Summary
AuthenticationException(java.lang.String message)
          Constructs an AuthenticationException with the specified message and no root cause.
AuthenticationException(java.lang.String message, java.lang.Throwable cause)
          Constructs an AuthenticationException with the specified message and root cause.
 
Method Summary
 void addAdditionalInformation(java.lang.String key, java.lang.Object value)
          Add a piece of additional information about this exception.
 java.util.Map<java.lang.String,java.lang.Object> getAdditionalInformation()
          Get any additional information about this exception.
abstract  java.lang.String getErrorCode()
          Retrieve the error code associated with this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE_CONFLICT

public static final java.lang.String RESOURCE_CONFLICT
Error code used to indicate registration failed because the user account conflicts with an already existing one.

See Also:
Constant Field Values

ATTRIBUTE_CREATE_DENIED

public static final java.lang.String ATTRIBUTE_CREATE_DENIED
Error code used to indicate authentication failed because policy denied one or more attributes in the registration data.

See Also:
Constant Field Values

INVALID_RESOURCE

public static final java.lang.String INVALID_RESOURCE
Error code used to indicate authentication failed because registration request included an invalid registration data.

See Also:
Constant Field Values

BAD_CREDENTIALS

public static final java.lang.String BAD_CREDENTIALS
Error code used to indicate authentication failed because the provided credentials are not valid.

See Also:
Constant Field Values

CREDENTIALS_EXPIRED

public static final java.lang.String CREDENTIALS_EXPIRED
Error code used to indicate authentication failed because the user's credentials have expired.

See Also:
Constant Field Values

INVALID_IDENTITY_PROVIDER

public static final java.lang.String INVALID_IDENTITY_PROVIDER
Error code used to indicate authentication failed because invalid identity provider is specified.

See Also:
Constant Field Values

INVALID_CLIENT

public static final java.lang.String INVALID_CLIENT
Error code used to indicate authentication failed because the request included an invalid client ID.

See Also:
Constant Field Values

INVALID_REQUEST

public static final java.lang.String INVALID_REQUEST
Error code used to indicate authentication failed because the request is invalid.

See Also:
Constant Field Values

INTERNAL_ERROR

public static final java.lang.String INTERNAL_ERROR
Error code used to indicate authentication failed due to a internal error.

See Also:
Constant Field Values

USER_DISABLED

public static final java.lang.String USER_DISABLED
Error code used to indicate authentication failed because the user account is disabled.

See Also:
Constant Field Values

USER_LOCKED

public static final java.lang.String USER_LOCKED
Error code used to indicate authentication failed because the user account is locked.

See Also:
Constant Field Values

OAUTH2_ERROR

public static final java.lang.String OAUTH2_ERROR
Error code used to indicate authentication failed with an external identity provider while performing the OAuth 2 flow.

See Also:
Constant Field Values
Constructor Detail

AuthenticationException

public AuthenticationException(java.lang.String message)
Constructs an AuthenticationException with the specified message and no root cause.

Parameters:
message - the detail message

AuthenticationException

public AuthenticationException(java.lang.String message,
                               java.lang.Throwable cause)
Constructs an AuthenticationException with the specified message and root cause.

Parameters:
message - the detail message
cause - the root cause
Method Detail

getAdditionalInformation

public java.util.Map<java.lang.String,java.lang.Object> getAdditionalInformation()
Get any additional information about this exception.

Returns:
Any additional information, or null.

addAdditionalInformation

public void addAdditionalInformation(java.lang.String key,
                                     java.lang.Object value)
Add a piece of additional information about this exception.

Parameters:
key - The key.
value - The value.

getErrorCode

public abstract java.lang.String getErrorCode()
Retrieve the error code associated with this exception.

Returns:
The error code associated with this exception.