use of org.apereo.cas.adaptors.azure.AzureAuthenticatorTokenCredential in project cas by apereo.
the class AzureAuthenticatorGenerateTokenAction method doExecute.
@Override
public Event doExecute(final RequestContext requestContext) throws Exception {
final Integer code = Integer.valueOf(RandomStringUtils.randomNumeric(8));
final AzureAuthenticatorTokenCredential c = new AzureAuthenticatorTokenCredential();
c.setToken(code.toString());
WebUtils.putCredential(requestContext, c);
requestContext.getFlowScope().put("azureToken", code);
if (mode == MultifactorAuthenticationProperties.Azure.AuthenticationModes.POUND) {
return new EventFactorySupport().event(this, "authenticate");
}
return success();
}
Aggregations