|
|
# Two Factor Authentication
|
|
# Two Factor Authentication
|
|
|
|
|
|
|
|
Two factor authentication is configured with a (script)[/configuration/scripts].
|
|
Two factor authentication is configured with a [script](/configuration/scripts). The configuration is resolved through the ´resolveConfig´ method. An example configuration:
|
|
|
|
|
|
|
|
```javascript
|
|
```javascript
|
|
|
var resolveConfig = function (scriptingEnv, configMap, identity, logger) {
|
|
var resolveConfig = function (scriptingEnv, configMap, identity, logger) {
|
|
|
logger.debug("Starting linotp config resolv");
|
|
logger.debug("Starting linotp config resolv");
|
|
|
|
|
|
|
|
|
|
|
|
|
for each (user in identity.getUsers()) {
|
|
for each (user in identity.getUsers()) {
|
|
|
if (user.getIdp().getEntityId().equals("<entity-id>")) {
|
|
if (user.getIdp().getEntityId().equals("<entity-id>")) {
|
|
|
logger.debug("Using alternative Linotp Server");
|
|
logger.debug("Using alternative Linotp Server");
|
| ... | @@ -28,4 +27,5 @@ var resolveConfig = function (scriptingEnv, configMap, identity, logger) { |
... | @@ -28,4 +27,5 @@ var resolveConfig = function (scriptingEnv, configMap, identity, logger) { |
|
|
configMap.put("userId", identity.getTwoFaUserName());
|
|
configMap.put("userId", identity.getTwoFaUserName());
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
``` |
|
```
|
|
\ No newline at end of file |
|
|