Interface AuthenticationMechanismContext


public interface AuthenticationMechanismContext
This interface represents an authentication context.
  • Method Summary

    Modifier and Type
    Method
    Description
    get(Scope scope, String namespace, String name)
    Get the value of context attribute with the specified scope, namespace, and name.
    Get the user credential.
    Get the request of the current user interaction.
    Get the response of the current user interaction.
    remove(Scope scope, String namespace, String name)
    Remove the value of context attribute with the specified scope, namespace, and name.
    void
    set(Scope scope, String namespace, String name, Object value)
    Set the value of context attribute with the specified scope, namespace, and name with the specified value.
    void
    Set the user credential.
  • Method Details

    • get

      Object get(Scope scope, String namespace, String name)
      Get the value of context attribute with the specified scope, namespace, and name.
      Parameters:
      scope - The scope.
      namespace - The namespace.
      name - The name.
      Returns:
      The value.
    • set

      void set(Scope scope, String namespace, String name, Object value)
      Set the value of context attribute with the specified scope, namespace, and name with the specified value. If the scope is SESSION, the value must be a sub-type of Serializable.
      Parameters:
      scope - The scope.
      namespace - The namespace.
      name - The name.
      value - The value.
    • remove

      Object remove(Scope scope, String namespace, String name)
      Remove the value of context attribute with the specified scope, namespace, and name.
      Parameters:
      scope - The scope.
      namespace - The namespace.
      name - The name.
      Returns:
      The removed value.
    • getRequest

      Request getRequest()
      Get the request of the current user interaction.
    • getResponse

      Response getResponse()
      Get the response of the current user interaction.
    • getCredential

      Credential getCredential()
      Get the user credential. If the user is not authenticated, this method returns NULL. If the returned user credential is modified, call the method setCredential(Credential) to persist the modifications.
      Returns:
      User credential.
    • setCredential

      void setCredential(Credential credential)
      Set the user credential. If the specified credential is NULL, authentication service sets the user as not authenticated.
      Parameters:
      credential - The user credential.