Class MMFARegistration

    • Constructor Detail

      • MMFARegistration

        public MMFARegistration​(Properties ctx,
                                int MFA_Registration_ID,
                                String trxName)
        Read/Create empty MFA Registration
        Parameters:
        ctx - context
        MFA_Registration_ID - ID
        trxName - transaction
      • MMFARegistration

        public MMFARegistration​(Properties ctx,
                                ResultSet rs,
                                String trxName)
        Read MFA Registration from current row in ResultSet
        Parameters:
        ctx - context
        rs - ResultSet
        trxName - transaction
    • Method Detail

      • alreadyExistsValid

        public static boolean alreadyExistsValid​(MMFAMethod method,
                                                 String prm)
        Validate if a method is already registered for this user
        Parameters:
        method -
        prm -
        Returns:
      • getValidRegistrationsFromUser

        public static List<MMFARegistration> getValidRegistrationsFromUser()
        Get the valid registrations from this user
        Returns:
      • userHasValidRegistration

        public static boolean userHasValidRegistration()
        If the user has valid registration mechanisms
        Returns:
      • generateValidationCode

        public String generateValidationCode​(MMFARegistration reg)
        Generate a validation code using the registered method
        Parameters:
        reg -
        Returns:
      • validateCode

        public String validateCode​(MMFARegistration reg,
                                   String code,
                                   boolean setPreferred)
        Validate the code using the registered method
        Parameters:
        reg -
        code -
        setPreferred -
        Returns:
      • setAD_User_ID

        public void setAD_User_ID​(int AD_User_ID)
        Set User/Contact.
        Specified by:
        setAD_User_ID in interface I_MFA_Registration
        Overrides:
        setAD_User_ID in class X_MFA_Registration
        Parameters:
        AD_User_ID - User within the system - Internal or Business Partner Contact Overridden to allow saving System record (zero ID)