Class CmsTwoFactorAuthenticationConfig

java.lang.Object
org.opencms.security.twofactor.CmsTwoFactorAuthenticationConfig

Represents the configuration for the two-factor authentication feature.
  • Constructor Details

    • CmsTwoFactorAuthenticationConfig

      public CmsTwoFactorAuthenticationConfig(org.dom4j.Element element)
      Creates a new configuration from the given XML configuration element.
      Parameters:
      element - the element from which to read the configuration
  • Method Details

    • getConfigElement

      public org.dom4j.Element getConfigElement()
      Gets the configuration element.
      Returns:
      the configuration element
    • getIssuer

      public String getIssuer()
      Gets the issuer (encoded in generated QR codes and displayed by authenticator apps).
      Returns:
      the issuer
    • getPolicy

      Gets the policy which controls which users should use two-factor authentication.
      Returns:
      the user policy
    • getSecret

      public String getSecret()
      Gets the secret key which is used to encrypt/decrypt two-factor authentication information stored in the user's additional infos.
      Returns:
      the secret key
    • getSetupMessage

      Gets the setup message.
      Returns:
      the setup message
    • isEnabled

      public boolean isEnabled()
      Checks if two-factor authentication is enabled.

      If it is disabled, users can just log in with user name and password.

      Returns:
      true if 2FA is enabled