Interface IMFAMechanism


  • public interface IMFAMechanism
    • Method Detail

      • register

        Object[] register​(Properties ctx,
                          MMFAMethod method,
                          String prm,
                          String trxName)
        Registration mechanism for the method Here the registration method executes the actions expected for this method, like sending an email, or an SMS, or nothing and creates the registration record
        Parameters:
        ctx -
        method -
        prm - optional, for example the email
        trxName -
        Returns:
        Object[] - first object is the String with the instructions to follow second object is the registration generated third and posterior objects are optional additional information for the method like QRCode image for example, or html img object, or URL, or File
      • complete

        String complete​(Properties ctx,
                        MMFARegistration reg,
                        String code,
                        String name,
                        boolean preferred,
                        String trxName)
        Complete/Validate a previous registration Here it must check for validity of the mechanism, mark the record as valid or throw exception when not
        Parameters:
        ctx -
        reg - The registration object
        code - The code to be validated
        name - Optional - a name to assign the registration
        preferred -
        trxName -
        Returns:
        msg A message indicating success, errors throw exception
      • generateValidationCode

        String generateValidationCode​(MMFARegistration reg)
        Generate a validation code (when needed depending on the method)
        Parameters:
        reg -
        Returns:
      • validateCode

        String validateCode​(MMFARegistration reg,
                            String code,
                            boolean setPreferred)
        Validate a code
        Parameters:
        reg -
        code -
        setPreferred -
        Returns:
        message on error, null when OK