use of com.warrenstrange.googleauth.GoogleAuthenticator in project cas by apereo.
the class JsonGoogleAuthenticatorTokenCredentialRepositoryTests method setup.
@Before
public void setup() {
final GoogleAuthenticatorConfig.GoogleAuthenticatorConfigBuilder bldr = new GoogleAuthenticatorConfig.GoogleAuthenticatorConfigBuilder();
this.google = new GoogleAuthenticator(bldr.build());
}
use of com.warrenstrange.googleauth.GoogleAuthenticator in project cas by apereo.
the class GoogleAuthenticatorAuthenticationEventExecutionPlanConfiguration method googleAuthenticatorInstance.
@Bean
public IGoogleAuthenticator googleAuthenticatorInstance() {
final GAuthMultifactorProperties gauth = casProperties.getAuthn().getMfa().getGauth();
final GoogleAuthenticatorConfig.GoogleAuthenticatorConfigBuilder bldr = new GoogleAuthenticatorConfig.GoogleAuthenticatorConfigBuilder();
bldr.setCodeDigits(gauth.getCodeDigits());
bldr.setTimeStepSizeInMillis(TimeUnit.SECONDS.toMillis(gauth.getTimeStepSize()));
bldr.setWindowSize(gauth.getWindowSize());
bldr.setKeyRepresentation(KeyRepresentation.BASE32);
return new GoogleAuthenticator(bldr.build());
}
Aggregations