ModelType - The type for the model associated with the action (or Void if no model is associated with the action).public class AuthnActionSpec<ModelType> extends Object
AuthnAction instances.
This allows common definitions for authentication flow actions to be shared across plugins. This class is also used
to generate documentation for a plugin's API. Once created, objects of this class are immutable.
Objects of this class are not normally returned in API responses. Instead, you create an
AuthnAction instance using the makeInstance() method.| Modifier and Type | Class and Description |
|---|---|
static class |
AuthnActionSpec.Builder<ModelType>
A fluent builder for
AuthnActionSpec specs. |
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
Gets the description of this action for API documentation.
|
List<AuthnErrorGroup> |
getErrorGroups()
Get a list of errors that can be returned when this action is requested.
|
String |
getId()
Get the ID of the action.
|
Class<ModelType> |
getModelClass()
Gets the class of the model associated with this action, if there is one.
|
boolean |
isRequested(javax.servlet.http.HttpServletRequest req)
Determine if this action has been requested, based on the content type of the request.
|
AuthnAction |
makeInstance()
Create a new
AuthnAction instance based on this spec. |
<ValueType> |
makeParamMapping(String formParamName,
java.util.function.Function<ModelType,ValueType> modelFieldRetriever,
java.util.function.Function<String,ValueType> paramFieldRetriever)
Create a new param mapping from this action spec.
|
public String getId()
public String getDescription()
public Class<ModelType> getModelClass()
public List<AuthnErrorGroup> getErrorGroups()
public AuthnAction makeInstance()
AuthnAction instance based on this spec.public <ValueType> ParamMapping<ModelType,ValueType> makeParamMapping(String formParamName, java.util.function.Function<ModelType,ValueType> modelFieldRetriever, java.util.function.Function<String,ValueType> paramFieldRetriever)
formParamName - The name of the form parameter.modelFieldRetriever - A function for retrieving the value of this field from an instance of the action's model.paramFieldRetriever - A function for retrieving the value of this field from the servlet request's parameterpublic boolean isRequested(javax.servlet.http.HttpServletRequest req)
req - The servlet request.Copyright 2019 Ping Identity Corp. All rights reserved.