Search in sources :

Example 1 with TestOneTimePasswordAuthenticationHandler

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));
}
Also used : HashMap(java.util.HashMap) TestOneTimePasswordAuthenticationHandler(org.apereo.cas.TestOneTimePasswordAuthenticationHandler) AcceptUsersAuthenticationHandler(org.apereo.cas.authentication.AcceptUsersAuthenticationHandler)

Aggregations

HashMap (java.util.HashMap)1 TestOneTimePasswordAuthenticationHandler (org.apereo.cas.TestOneTimePasswordAuthenticationHandler)1 AcceptUsersAuthenticationHandler (org.apereo.cas.authentication.AcceptUsersAuthenticationHandler)1