Multi Factor Authenticator Plugin

The Multi-Factor Authenticator Plugin provides multi-factor authentication through the Security Enhanced Directory Manager. Once enabled, users can activate this feature in their profile settings. A usable Multi-Factor Authenticator Plugin must extend the org.joget.apps.app.service.MfaAuthenticator abstract class.

Abstract Class

org.joget.apps.app.service.MfaAuthenticator

Method Detail

Abstract Methods
getKey

public String getKey();
The key to load/store multi factor authentication data from user meta table.

validateOtpUrl

public String validateOtpUrl(String username);
URL to show when OTP (one-time password) is required.

validateOtpMessage

public String validateOtpMessage(String username);
Message to show when OTP (one-time password) is required.

activateOtpUrl

public String activateOtpUrl(String username);
URL to activate OTP (one-time password).

Overridable Methods
userProfileHtml

public String userProfileHtml(String username, HttpServletRequest request);
HTML for rendering the MFA interface to activate/deactivate the MFA.

updateUserProfileProcessing

public String updateUserProfileProcessing(String username, HttpServletRequest request);
Processing after a user profile is updated to update MFA status.

isOtpRequired

public boolean isOtpRequired(String username);
Checks whether OTP is required (MFA is enabled) for a user.

clearOtp

public void clearOtp(String username);
Deletes the current OTP for the user.

Utility Methods
loginUser

public String loginUser (String username) throws IOException;
Login the user.

getRedirectUrl

public String getRedirectUrl();
Get the redirection URL after login.

getTemplate

public String getTemplate(String template, Map model);
Method to retrieve the html template.

Parameters

      • template - the template path
      • model - data to pass to template
 
Created by Damian Last modified by Nik Nufayl on Dec 18, 2024