Search in sources :

Example 1 with AuthenticatorFactory

use of org.keycloak.authentication.AuthenticatorFactory in project keycloak by keycloak.

the class ConditionalUserConfiguredAuthenticator method isConfiguredFor.

private boolean isConfiguredFor(AuthenticationExecutionModel model, AuthenticationFlowContext context) {
    if (model.isAuthenticatorFlow()) {
        return matchConditionInFlow(context, model.getId());
    }
    AuthenticatorFactory factory = (AuthenticatorFactory) context.getSession().getKeycloakSessionFactory().getProviderFactory(Authenticator.class, model.getAuthenticator());
    Authenticator authenticator = factory.create(context.getSession());
    return authenticator.configuredFor(context.getSession(), context.getRealm(), context.getUser());
}
Also used : AuthenticatorFactory(org.keycloak.authentication.AuthenticatorFactory) Authenticator(org.keycloak.authentication.Authenticator)

Aggregations

Authenticator (org.keycloak.authentication.Authenticator)1 AuthenticatorFactory (org.keycloak.authentication.AuthenticatorFactory)1