Package org.irods.irods4j.authentication
Class PamInteractiveAuthPlugin
java.lang.Object
org.irods.irods4j.authentication.AuthPlugin
org.irods.irods4j.authentication.PamInteractiveAuthPlugin
This class implements the pam_interactive authentication scheme.
It enables organizations to develop dynamic authentication flows that meet their needs.
- Since:
- 0.3.0
-
Field Summary
Fields inherited from class org.irods.irods4j.authentication.AuthPlugin
AUTH_AGENT_AUTH_REQUEST, AUTH_AGENT_AUTH_RESPONSE, AUTH_AGENT_AUTH_VERIFY, AUTH_AGENT_START, AUTH_CLIENT_AUTH_REQUEST, AUTH_CLIENT_AUTH_RESPONSE, AUTH_CLIENT_START, AUTH_ESTABLISH_CONTEXT, AUTH_FLOW_COMPLETE, AUTH_FORCE_PASSWORD_PROMPT, AUTH_NEXT_OPERATION, AUTH_PASSWORD_KEY, AUTH_RESPONSE_KEY, AUTH_SCHEME_KWY, AUTH_TTL_KEY, AUTH_USER_KEY -
Constructor Summary
ConstructorsConstructorDescriptionPamInteractiveAuthPlugin(boolean requireSecureConnection) Construct a new PAM Interactive plugin instance.PamInteractiveAuthPlugin(boolean requireSecureConnection, Function<String, String> getInputHandler, Function<String, String> getSensitiveInputHandler) Construct a new PAM Interactive plugin instance with custom input handlers. -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.JsonNodeauthClientStart(IRODSApi.RcComm comm, com.fasterxml.jackson.databind.JsonNode context) getName()Methods inherited from class org.irods.irods4j.authentication.AuthPlugin
addOperation, execute, request
-
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
- Specified by:
getNamein classAuthPlugin- 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:
authClientStartin classAuthPlugin
-