Class PamInteractiveAuthPlugin

java.lang.Object
org.irods.irods4j.authentication.AuthPlugin
org.irods.irods4j.authentication.PamInteractiveAuthPlugin

public class PamInteractiveAuthPlugin extends AuthPlugin
This class implements the pam_interactive authentication scheme.

It enables organizations to develop dynamic authentication flows that meet their needs.

Since:
0.3.0
  • Constructor Details

    • PamInteractiveAuthPlugin

      public PamInteractiveAuthPlugin(boolean requireSecureConnection)
      Construct a new PAM Interactive plugin instance.

      All user input is read from stdin. User input containing sensitive information is never echoed to stdout.

      Spaces will be removed from non-sensitive user input.

      Parameters:
      requireSecureConnection - Instructs the authentication flow to fail if the connection isn't secure.
      Since:
      0.3.0
    • PamInteractiveAuthPlugin

      public PamInteractiveAuthPlugin(boolean requireSecureConnection, Function<String,String> getInputHandler, Function<String,String> getSensitiveInputHandler)
      Construct a new PAM Interactive plugin instance with custom input handlers.

      This constructor is for situations where the environment doesn't rely on stdin - e.g. a GUI application. The callbacks passed to this constructor are responsible for securing user input.

      Callbacks MUST accept a prompt and return a string representing the user's input. The returned string MUST be non-null.

      Parameters:
      requireSecureConnection - Instructs the authentication flow to fail if the connection isn't secure.
      getInputHandler - The callback used for accepting non-sensitive user input. Spaces will be removed from the user input.
      getSensitiveInputHandler - The callback used for accepting sensitive user input.
      Throws:
      IllegalArgumentException - If either callback parameter is null.
      Since:
      0.3.0
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in class AuthPlugin
      Returns:
      The name of the authentication scheme.
    • authClientStart

      public com.fasterxml.jackson.databind.JsonNode authClientStart(IRODSApi.RcComm comm, com.fasterxml.jackson.databind.JsonNode context)
      Specified by:
      authClientStart in class AuthPlugin