Enum AuthenticationAction
- java.lang.Object
-
- java.lang.Enum<AuthenticationAction>
-
- org.xwiki.security.authentication.AuthenticationAction
-
- All Implemented Interfaces:
Serializable
,Comparable<AuthenticationAction>
@Unstable public enum AuthenticationAction extends Enum<AuthenticationAction>
Possible actions forAuthenticationResourceReference
.- Since:
- 13.1RC1
- Version:
- $Id: d3edd9b5b3bb8d57353e3ed053b100e6eed80b3b $
-
-
Enum Constant Summary
Enum Constants Enum Constant Description RESET_PASSWORD
Action used to reset the password of a user.RETRIEVE_USERNAME
Action used to retrieve the username of a user.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AuthenticationAction
getFromRequestParameter(String parameter)
Retrieve an action based on the request parameter.String
getRequestParameter()
static AuthenticationAction
valueOf(String name)
Returns the enum constant of this type with the specified name.static AuthenticationAction[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
RESET_PASSWORD
public static final AuthenticationAction RESET_PASSWORD
Action used to reset the password of a user.
-
RETRIEVE_USERNAME
public static final AuthenticationAction RETRIEVE_USERNAME
Action used to retrieve the username of a user.
-
-
Method Detail
-
values
public static AuthenticationAction[] 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 (AuthenticationAction c : AuthenticationAction.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AuthenticationAction 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
-
getRequestParameter
public String getRequestParameter()
- Returns:
- the request parameter associated to this action.
-
getFromRequestParameter
public static AuthenticationAction getFromRequestParameter(String parameter) throws IllegalArgumentException
Retrieve an action based on the request parameter.- Parameters:
parameter
- the parameter from which to retrieve the action.- Returns:
- an action associated to the given parameter.
- Throws:
IllegalArgumentException
- if the parameter is empty or if no action could be found based on it.
-
-