use of org.apereo.cas.gauth.credential.GoogleAuthenticatorTokenCredential in project cas by apereo.
the class GoogleAuthenticatorAuthenticationHandlerTests method getGoogleAuthenticatorTokenCredential.
private GoogleAuthenticatorTokenCredential getGoogleAuthenticatorTokenCredential() {
val credential = new GoogleAuthenticatorTokenCredential();
account = googleAuthenticator.createCredentials("casuser");
val key = googleAuthenticator.getTotpPassword(account.getKey());
credential.setToken(Integer.toString(key));
return credential;
}
Aggregations