Usages

  • Multi Factor Authenticator Plugin is used by Security Enhanced Directory Manager to provide multi factor authentication feature.

  • Once Multi Factor Authenticator Plugin is enabled in Security Enhanced Directory Manager, a user can choose to enable it under user profile page.
  • A useable Multi Factor Authenticator Plugin must extend 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
  • No labels