Class AuthnStateSpec<ModelType>

  • Type Parameters:
    ModelType - The type for the model associated with the state (or Void if no model is associated with the state).

    public class AuthnStateSpec<ModelType>
    extends Object
    A class which acts as a template for AuthnState instances. This allows common definitions for authentication flow states 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 AuthnState instance using the makeInstance() method.
    Since:
    9.3
    • Method Detail

      • getStatus

        public String getStatus()
        Gets the status for this state.
      • getDescription

        public String getDescription()
        Gets the description of this state for API documentation.
      • getActions

        public List<AuthnActionSpec<?>> getActions()
        Gets the complete list of allowed actions from this state. When returning an instance of AuthnState based on this spec, actions may be removed from this list if they are not currently available to the user.
      • getModelClass

        public Class<ModelType> getModelClass()
        Gets the class of the model associated with this state, if there is one.
      • makeInstance

        public AuthnState<ModelType> makeInstance​(javax.servlet.http.HttpServletRequest request,
                                                  ModelType model)
        Create a new AuthnState instance based on this spec.
        Parameters:
        request - The servlet request.
        model - An instance of the model for this state (optional).
        Returns:
        A new state instance.