Search in sources :

Example 1 with AzureAuthenticatorTokenCredential

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();
}
Also used : AzureAuthenticatorTokenCredential(org.apereo.cas.adaptors.azure.AzureAuthenticatorTokenCredential) EventFactorySupport(org.springframework.webflow.action.EventFactorySupport)

Aggregations

AzureAuthenticatorTokenCredential (org.apereo.cas.adaptors.azure.AzureAuthenticatorTokenCredential)1 EventFactorySupport (org.springframework.webflow.action.EventFactorySupport)1