Class GroovyMfaService

java.lang.Object
de.uplanet.lucy.server.mfa.scripting.groovy.GroovyMfaService

@Scriptable public final class GroovyMfaService extends Object
  • Method Details

    • createInstance

      public static GroovyMfaService createInstance()
      Create an instance of this API class.
      Returns:
      A new instance of this class.
    • sendAuthenticationCodeSms

      public String sendAuthenticationCodeSms(Map<String,Object> p_params)
      Send an authentication code via SMS.

      The caller must store the returned reference ID for later verification of the authentication code received by the user.

      If a secret is provided then the same secret must be provided for verification.

      Parameters:

      • to (required): The recipients phone number.
      • secret (optional): A secret used to verify the authentication code, e.g. a user password. If none is supplied then a secret derived from the returned reference ID is used.
      • lang (optional): The language to be used. If none is supplied then the default language of the portal is used.

      Parameters:
      p_params - Named parameters (see above).
      Returns:
      The reference ID that uniquely identifies the sent authentication code within the system.
    • sendAuthenticationCodeVoice

      public String sendAuthenticationCodeVoice(Map<String,Object> p_params)
      Send an authentication code via voice call.

      The caller must store the returned reference ID for later verification of the authentication code received by the user.

      If a secret is provided then the same secret must be provided for verification.

      Parameters:

      • to (required): The recipients phone number.
      • secret (optional): A secret used to verify the authentication code, e.g. a user password. If none is supplied then a secret derived from the returned reference ID is used.
      • lang (optional): The language to be used. If none is supplied then the default language of the portal is used.

      Parameters:
      p_params - Named parameters (see above).
      Returns:
      The reference ID that uniquely identifies the sent authentication code within the system.
    • verifyAuthenticationCode

      public boolean verifyAuthenticationCode(Map<String,Object> p_params)
      Verify an authentication code previously sent with sendAuthenticationCodeSms(Map) or sendAuthenticationCodeVoice(Map).

      Parameters:

      Parameters:
      p_params - Named parameters (see above).
    • clearAuthenticationCode

      public boolean clearAuthenticationCode(String p_strRefId)
      Remove an authentication code from the MFA authentication service.
      Parameters:
      p_strRefId - The unique reference ID used to identify the code.
      Returns:
      true if the authentication code is valid, or false if it is invalid or expired.