Package com.iizix.user
Enum Class SigninResult
- All Implemented Interfaces:
Serializable
,Comparable<SigninResult>
,Constable
Enum for user sign in result.
Text IDs used by the SigninResult
userauth.success = Success. userauth.success_not_signed_in = Success, but you need to Sign In to proceed. userauth.success.change_password = Success, change of password needed. userauth.invalid_password = Invalid password. userauth.too_many_invalid_logins_retry_later = Too many invalid logins. Please retry later. userauth.too_many_invalid_logins_retry_later_next_time_disable = Too many invalid logins. Please retry later. Upon next failure, your user will be disabled. userauth.invalid_password_next_attempt_will_disable = Invalid password. Upon next failure, your user will be disabled. userauth.disabled = Your user has been disabled, please contact your app supplier. userauth.invalid_user = Invalid user name. userauth.user_name_taken = User name taken, cannot sign up. userauth.app_id_not_found = Application ID is not found. userauth.app_disabled = The application is disabled. userauth.server_not_started = Server not started. userauth.server_starting = Server is starting. userauth.server_stopped = Server is stopped. userauth.server_stopping = Server is stopping. userauth.server_login_disabled = Login to server is currently disabled. userauth.system_failure = A system failure occurred when authentication your user.
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Enum Constant Summary
Enum ConstantDescriptionThe application is disabled.Application ID is not found.Invalid password.User has too many invalid logins: retry later, but next time, the user will be disabled upon a failure.Invalid user name.Login to server is currently disabled.Server is not started.Server is starting.Server is stopped.Server is stopping.Validation succeeded.Validation succeeded, but user has to change password.Validation succeeded for the user, but as no password has been verified, it is assumed that the user is not signed in yet.System failure.User has too many invalid logins: retry later.User has too many invalid logins: retry later.User is disabled.User name taken, cannot sign up.Field Summary
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns if the login is successful, even if e.g.boolean
Returns if the user must change password.static SigninResult
Returns the enum constant of this class with the specified name.static SigninResult[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
Enum Constant Details
SUCCESS
Validation succeeded.SUCCESS_NOT_SIGNED_IN
Validation succeeded for the user, but as no password has been verified, it is assumed that the user is not signed in yet.SUCCESS_CHANGE_PASSWORD
Validation succeeded, but user has to change password.INVALID_PASSWORD
Invalid password.TOO_MANY_INVALID_LOGINS_RETRY_LATER
User has too many invalid logins: retry later.TOO_MANY_INVALID_LOGINS_RETRY_LATER_NEXT_TIME_DISABLE
User has too many invalid logins: retry later. A failure next time will disable the user.INVALID_PASSWORD_NEXT_ATTEMPT_WILL_DISABLE
User has too many invalid logins: retry later, but next time, the user will be disabled upon a failure.USER_DISABLED
User is disabled.INVALID_USER
Invalid user name.USER_NAME_TAKEN
User name taken, cannot sign up.APP_ID_NOT_FOUND
Application ID is not found.APP_DISABLED
The application is disabled.SERVER_NOT_STARTED
Server is not started.SERVER_STARTING
Server is starting.SERVER_STOPPING
Server is stopping.SERVER_STOPPED
Server is stopped.SERVER_LOGIN_DISABLED
Login to server is currently disabled.SYSTEM_FAILURE
System failure.
Field Details
englishMessage
The English text message.textID
The text ID for the message, starts with "userauth.".
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
isSuccessful
public boolean isSuccessful()Returns if the login is successful, even if e.g. password must be changed.- Returns:
- true for SUCCESS and SUCCESS_CHANGE_PASSWORD, false otherwise.
mustChangePassword
public boolean mustChangePassword()Returns if the user must change password.- Returns:
- true if user must change password to continue, i.e. SUCCESS_CHANGE_PASSWORD, false otherwise.