use of org.apereo.cas.TestOneTimePasswordAuthenticationHandler in project cas by apereo.
the class CasMultifactorTestAuthenticationEventExecutionPlanConfiguration method configureAuthenticationExecutionPlan.
@Override
public void configureAuthenticationExecutionPlan(final AuthenticationEventExecutionPlan plan) {
final HashMap<String, String> users = new HashMap<>();
users.put("alice", "alice");
users.put("bob", "bob");
users.put("mallory", "mallory");
final HashMap<String, String> credentials = new HashMap<>();
credentials.put("alice", "31415");
credentials.put("bob", "62831");
credentials.put("mallory", "14142");
plan.registerAuthenticationHandler(new AcceptUsersAuthenticationHandler("", null, null, null, users));
plan.registerAuthenticationHandler(new TestOneTimePasswordAuthenticationHandler(credentials));
}
Aggregations