|
|
# Two Factor Authentication
|
|
# Two Factor Authentication
|
|
|
|
|
|
|
|
Two factor authentication is configured with a [script](/configuration/rules#scripts). The configuration is resolved through the ´resolveConfig´ method. An example configuration:
|
|
Two factor authentication is configured with a [script](/configuration/rules#scripts). The configuration is resolved through the ´resolveConfig´ method. The script must be configured in the global configuration (/admin/config/index.xhtml) as "linotp_resolve_config" and the name of the script. To show the MFA link in the navigation bar, configure the option "show_twofa" to "true".
|
|
|
|
|
|
|
|
An example configuration:
|
|
|
|
|
|
|
|
```javascript
|
|
```javascript
|
|
|
var resolveConfig = function (scriptingEnv, configMap, identity, logger) {
|
|
var resolveConfig = function (scriptingEnv, configMap, identity, logger) {
|
| ... | @@ -26,6 +28,4 @@ var resolveConfig = function (scriptingEnv, configMap, identity, logger) { |
... | @@ -26,6 +28,4 @@ var resolveConfig = function (scriptingEnv, configMap, identity, logger) { |
|
|
configMap.put("adminRole", "StandardTokenRealmRole");
|
|
configMap.put("adminRole", "StandardTokenRealmRole");
|
|
|
configMap.put("userId", identity.getTwoFaUserName());
|
|
configMap.put("userId", identity.getTwoFaUserName());
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
``` |
|
``` |
|
\ No newline at end of file |
|
|
|
|
|
|
|