Interface Authenticator.Callback

Enclosing interface:
Authenticator

public static interface Authenticator.Callback
Single-use callback provided to the authenticate call.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    The authentication has neither passed nor failed.
    void
    Authentication passed - allow the authentication request with fixed properties as supplied but no user-defined properties.
    void
    allow(Map<String,String> properties)
    Authentication passed - allow the authentication request with modified fixed session properties and/or specified user-defined properties.
    void
    Authentication failed - deny the authentication request.
  • Method Details

    • allow

      void allow(Map<String,String> properties)
      Authentication passed - allow the authentication request with modified fixed session properties and/or specified user-defined properties.

      A map comprising fixed properties to be changed and/or user-defined properties to be added to the session must be passed to this method. Only user-defined properties that are explicitly passed via this map will be added to the session.

      For convenience, either the sessionProperties map or the proposedProperties map passed to the authenticate method can be modified in order to create a suitable map to be passed to this method. For example, if fixed properties only are to be changed then the relevant properties in the sessionProperties map can be altered before passing that map to this method (properties that are not changed will be ignored). If no fixed properties are to be changed but user-defined properties have been proposed and are acceptable then the proposedProperties map can be passed to this method. Properties can be added to or removed from the proposedProperties map before passing to this method.

      Parameters:
      properties - specifies user defined properties and/or any changes to fixed session properties. User defined properties can include those from the proposed properties or additional properties. Proposed properties not included in this map will not be added to the session. See authenticate.
      Throws:
      IllegalStateException - if another method has already been invoked on this callback
    • allow

      void allow()
      Authentication passed - allow the authentication request with fixed properties as supplied but no user-defined properties.

      If this method is used, any proposed properties passed to the authenticator will not be added to the session.

      Throws:
      IllegalStateException - if another method has already been invoked on this callback
    • abstain

      void abstain()
      The authentication has neither passed nor failed.
      Throws:
      IllegalStateException - if another method has already been invoked on this callback
    • deny

      void deny()
      Authentication failed - deny the authentication request.
      Throws:
      IllegalStateException - if another method has already been invoked on this callback