Package org.ldaptive.auth.ext
Enum Class ActiveDirectoryAccountState.Error
java.lang.Object
java.lang.Enum<ActiveDirectoryAccountState.Error>
org.ldaptive.auth.ext.ActiveDirectoryAccountState.Error
- All Implemented Interfaces:
Serializable
,Comparable<ActiveDirectoryAccountState.Error>
,Constable
,AccountState.Error
- Enclosing class:
- ActiveDirectoryAccountState
public static enum ActiveDirectoryAccountState.Error
extends Enum<ActiveDirectoryAccountState.Error>
implements AccountState.Error
Enum to define active directory errors. See http://ldapwiki.willeke.com/wiki/
Common%20Active%20Directory%20Bind%20Errors
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionaccount disabled.account expired.account locked out.invalid logon hours.invalid workstation.logon failure.no such user.password expired.password must change. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getCode()
Returns the error code.Returns the error message.Parses the supplied error messages and returns the corresponding error enum.void
Throws the LoginException that best maps to this error.valueOf
(int code) Returns the error for the supplied integer constant.Returns the enum constant of this class with the specified name.static ActiveDirectoryAccountState.Error[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_SUCH_USER
no such user. 0x525. -
LOGON_FAILURE
logon failure. 0x52e. -
INVALID_LOGON_HOURS
invalid logon hours. 0x530. -
INVALID_WORKSTATION
invalid workstation. 0x531. -
PASSWORD_EXPIRED
password expired. 0x532. -
ACCOUNT_DISABLED
account disabled. 0x533. -
ACCOUNT_EXPIRED
account expired. 0x701. -
PASSWORD_MUST_CHANGE
password must change. 0x773. -
ACCOUNT_LOCKED_OUT
account locked out. 0x775.
-
-
Field Details
-
HEX_RADIX
private static final int HEX_RADIXhex radix for hex to decimal conversion.- See Also:
-
PATTERN
pattern to find hex code in active directory messages. -
code
private final int codeunderlying error code.
-
-
Constructor Details
-
Error
private Error(int i) Creates a new active directory error.- Parameters:
i
- error code
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getCode
public int getCode()Description copied from interface:AccountState.Error
Returns the error code.- Specified by:
getCode
in interfaceAccountState.Error
- Returns:
- error code
-
getMessage
Description copied from interface:AccountState.Error
Returns the error message.- Specified by:
getMessage
in interfaceAccountState.Error
- Returns:
- error message
-
throwSecurityException
Description copied from interface:AccountState.Error
Throws the LoginException that best maps to this error.- Specified by:
throwSecurityException
in interfaceAccountState.Error
- Throws:
LoginException
- for this account state error
-
valueOf
Returns the error for the supplied integer constant.- Parameters:
code
- to find error for- Returns:
- error
-
parse
Parses the supplied error messages and returns the corresponding error enum. Attempts to findPATTERN
and parses the first group match as a hexadecimal integer.- Parameters:
message
- to parse- Returns:
- active directory error
-