Package org.opencms.security.twofactor
Class CmsTwoFactorAuthenticationConfig
java.lang.Object
org.opencms.security.twofactor.CmsTwoFactorAuthenticationConfig
Represents the configuration for the two-factor authentication feature.
-
Constructor Summary
ConstructorDescriptionCmsTwoFactorAuthenticationConfig
(org.dom4j.Element element) Creates a new configuration from the given XML configuration element. -
Method Summary
Modifier and TypeMethodDescriptionorg.dom4j.Element
Gets the configuration element.Gets the issuer (encoded in generated QR codes and displayed by authenticator apps).Gets the policy which controls which users should use two-factor authentication.Gets the secret key which is used to encrypt/decrypt two-factor authentication information stored in the user's additional infos.Gets the setup message.boolean
Checks if two-factor authentication is enabled.
-
Constructor Details
-
CmsTwoFactorAuthenticationConfig
Creates a new configuration from the given XML configuration element.- Parameters:
element
- the element from which to read the configuration
-
-
Method Details
-
getConfigElement
Gets the configuration element.- Returns:
- the configuration element
-
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
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
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
-