Package org.ldaptive.auth.ext
Enum FreeIPAAccountState.Error
- java.lang.Object
-
- java.lang.Enum<FreeIPAAccountState.Error>
-
- org.ldaptive.auth.ext.FreeIPAAccountState.Error
-
- All Implemented Interfaces:
Serializable,Comparable<FreeIPAAccountState.Error>,AccountState.Error
- Enclosing class:
- FreeIPAAccountState
public static enum FreeIPAAccountState.Error extends Enum<FreeIPAAccountState.Error> implements AccountState.Error
Enum to define FreeIPA errors.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACCOUNT_DISABLEDaccount disabled.ACCOUNT_EXPIREDaccount expired.ACCOUNT_NOT_FOUNDaccount not found.CREDENTIAL_NOT_FOUNDcredential not found.FAILED_AUTHENTICATIONfailed authentication.LOGIN_LOCKOUTlogin lockout.LOGIN_TIME_LIMITEDlogin time limited.MAXIMUM_LOGINS_EXCEEDEDmaximum logins exceeded.PASSWORD_EXPIREDpassword expired.UNKNOWNunknown state.
-
Field Summary
Fields Modifier and Type Field Description private intcodeunderlying error code.
-
Constructor Summary
Constructors Modifier Constructor Description privateError(int i)Creates a new freeipa error.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCode()Returns the error code.StringgetMessage()Returns the error message.static FreeIPAAccountState.Errorparse(ResultCode rc, String message)Parses the supplied error messages and returns the corresponding error enum.voidthrowSecurityException()Throws the LoginException that best maps to this error.static FreeIPAAccountState.ErrorvalueOf(int code)Returns the error for the supplied integer constant.static FreeIPAAccountState.ErrorvalueOf(String name)Returns the enum constant of this type with the specified name.static FreeIPAAccountState.Error[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final FreeIPAAccountState.Error UNKNOWN
unknown state.
-
FAILED_AUTHENTICATION
public static final FreeIPAAccountState.Error FAILED_AUTHENTICATION
failed authentication.
-
PASSWORD_EXPIRED
public static final FreeIPAAccountState.Error PASSWORD_EXPIRED
password expired.
-
ACCOUNT_EXPIRED
public static final FreeIPAAccountState.Error ACCOUNT_EXPIRED
account expired.
-
MAXIMUM_LOGINS_EXCEEDED
public static final FreeIPAAccountState.Error MAXIMUM_LOGINS_EXCEEDED
maximum logins exceeded.
-
LOGIN_TIME_LIMITED
public static final FreeIPAAccountState.Error LOGIN_TIME_LIMITED
login time limited.
-
LOGIN_LOCKOUT
public static final FreeIPAAccountState.Error LOGIN_LOCKOUT
login lockout.
-
ACCOUNT_NOT_FOUND
public static final FreeIPAAccountState.Error ACCOUNT_NOT_FOUND
account not found.
-
CREDENTIAL_NOT_FOUND
public static final FreeIPAAccountState.Error CREDENTIAL_NOT_FOUND
credential not found.
-
ACCOUNT_DISABLED
public static final FreeIPAAccountState.Error ACCOUNT_DISABLED
account disabled.
-
-
Method Detail
-
values
public static FreeIPAAccountState.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 (FreeIPAAccountState.Error c : FreeIPAAccountState.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 FreeIPAAccountState.Error valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- 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 String getMessage()
Description copied from interface:AccountState.ErrorReturns the error message.- Specified by:
getMessagein interfaceAccountState.Error- Returns:
- error message
-
throwSecurityException
public void throwSecurityException() throws LoginExceptionDescription copied from interface:AccountState.ErrorThrows the LoginException that best maps to this error.- Specified by:
throwSecurityExceptionin interfaceAccountState.Error- Throws:
LoginException- for this account state error
-
valueOf
public static FreeIPAAccountState.Error valueOf(int code)
Returns the error for the supplied integer constant.- Parameters:
code- to find error for- Returns:
- error
-
parse
public static FreeIPAAccountState.Error parse(ResultCode rc, String message)
Parses the supplied error messages and returns the corresponding error enum.- Parameters:
rc- result codemessage- to parse- Returns:
- freeipa error
-
-