Package org.ldaptive.auth.ext
Enum ActiveDirectoryAccountState.Error
- java.lang.Object
-
- java.lang.Enum<ActiveDirectoryAccountState.Error>
-
- org.ldaptive.auth.ext.ActiveDirectoryAccountState.Error
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ActiveDirectoryAccountState.Error>,AccountState.Error
- Enclosing class:
- ActiveDirectoryAccountState
public static enum ActiveDirectoryAccountState.Error extends java.lang.Enum<ActiveDirectoryAccountState.Error> implements AccountState.Error
Enum to define active directory errors. See http://ldapwiki.willeke.com/wiki/ Common%20Active%20Directory%20Bind%20Errors
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACCOUNT_DISABLEDaccount disabled.ACCOUNT_EXPIREDaccount expired.ACCOUNT_LOCKED_OUTaccount locked out.INVALID_LOGON_HOURSinvalid logon hours.INVALID_WORKSTATIONinvalid workstation.LOGON_FAILURElogon failure.NO_SUCH_USERno such user.PASSWORD_EXPIREDpassword expired.PASSWORD_MUST_CHANGEpassword must change.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCode()Returns the error code.java.lang.StringgetMessage()Returns the error message.static ActiveDirectoryAccountState.Errorparse(java.lang.String message)Parses the supplied error messages and returns the corresponding error enum.voidthrowSecurityException()Throws the LoginException that best maps to this error.static ActiveDirectoryAccountState.ErrorvalueOf(int code)Returns the error for the supplied integer constant.static ActiveDirectoryAccountState.ErrorvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ActiveDirectoryAccountState.Error[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NO_SUCH_USER
public static final ActiveDirectoryAccountState.Error NO_SUCH_USER
no such user. 0x525.
-
LOGON_FAILURE
public static final ActiveDirectoryAccountState.Error LOGON_FAILURE
logon failure. 0x52e.
-
INVALID_LOGON_HOURS
public static final ActiveDirectoryAccountState.Error INVALID_LOGON_HOURS
invalid logon hours. 0x530.
-
INVALID_WORKSTATION
public static final ActiveDirectoryAccountState.Error INVALID_WORKSTATION
invalid workstation. 0x531.
-
PASSWORD_EXPIRED
public static final ActiveDirectoryAccountState.Error PASSWORD_EXPIRED
password expired. 0x532.
-
ACCOUNT_DISABLED
public static final ActiveDirectoryAccountState.Error ACCOUNT_DISABLED
account disabled. 0x533.
-
ACCOUNT_EXPIRED
public static final ActiveDirectoryAccountState.Error ACCOUNT_EXPIRED
account expired. 0x701.
-
PASSWORD_MUST_CHANGE
public static final ActiveDirectoryAccountState.Error PASSWORD_MUST_CHANGE
password must change. 0x773.
-
ACCOUNT_LOCKED_OUT
public static final ActiveDirectoryAccountState.Error ACCOUNT_LOCKED_OUT
account locked out. 0x775.
-
-
Method Detail
-
values
public static ActiveDirectoryAccountState.Error[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ActiveDirectoryAccountState.Error c : ActiveDirectoryAccountState.Error.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ActiveDirectoryAccountState.Error valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getCode
public int getCode()
Description copied from interface:AccountState.ErrorReturns the error code.- Specified by:
getCodein interfaceAccountState.Error- Returns:
- error code
-
getMessage
public java.lang.String getMessage()
Description copied from interface:AccountState.ErrorReturns the error message.- Specified by:
getMessagein interfaceAccountState.Error- Returns:
- error message
-
throwSecurityException
public void throwSecurityException() throws javax.security.auth.login.LoginExceptionDescription copied from interface:AccountState.ErrorThrows the LoginException that best maps to this error.- Specified by:
throwSecurityExceptionin interfaceAccountState.Error- Throws:
javax.security.auth.login.LoginException- for this account state error
-
valueOf
public static ActiveDirectoryAccountState.Error valueOf(int code)
Returns the error for the supplied integer constant.- Parameters:
code- to find error for- Returns:
- error
-
parse
public static ActiveDirectoryAccountState.Error parse(java.lang.String message)
Parses the supplied error messages and returns the corresponding error enum. Attempts to findPATTERNand parses the first group match as a hexadecimal integer.- Parameters:
message- to parse- Returns:
- active directory error
-
-