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_DISABLED
account disabled.ACCOUNT_EXPIRED
account expired.ACCOUNT_NOT_FOUND
account not found.CREDENTIAL_NOT_FOUND
credential not found.FAILED_AUTHENTICATION
failed authentication.LOGIN_LOCKOUT
login lockout.LOGIN_TIME_LIMITED
login time limited.MAXIMUM_LOGINS_EXCEEDED
maximum logins exceeded.PASSWORD_EXPIRED
password expired.UNKNOWN
unknown state.
-
Field Summary
Fields Modifier and Type Field Description private int
code
underlying error code.
-
Constructor Summary
Constructors Modifier Constructor Description private
Error(int i)
Creates a new freeipa error.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCode()
Returns the error code.String
getMessage()
Returns the error message.static FreeIPAAccountState.Error
parse(ResultCode rc, String message)
Parses the supplied error messages and returns the corresponding error enum.void
throwSecurityException()
Throws the LoginException that best maps to this error.static FreeIPAAccountState.Error
valueOf(int code)
Returns the error for the supplied integer constant.static FreeIPAAccountState.Error
valueOf(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.Error
Returns the error code.- Specified by:
getCode
in interfaceAccountState.Error
- Returns:
- error code
-
getMessage
public String getMessage()
Description copied from interface:AccountState.Error
Returns the error message.- Specified by:
getMessage
in interfaceAccountState.Error
- Returns:
- error message
-
throwSecurityException
public void throwSecurityException() throws LoginException
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
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
-
-