This commit is contained in:
Bill Burke committed 2015-07-01 15:10:04 -04:00
1 parent 39aa09ca36
commit 39f2a4ab71
13 files changed
+70 -13

No files matched your search

@@ -10,6 +10,7 @@ import org.keycloak.models.AuthenticationExecutionModel;
public class AuthenticationExecutionEntity {
protected String id;
protected String authenticator;
private String authenticatorConfig;
protected String flowId;
protected AuthenticationExecutionModel.Requirement requirement;
protected int priority;
@@ -80,4 +81,12 @@ public class AuthenticationExecutionEntity {
public void setFlowId(String flowId) {
this.flowId = flowId;
}
public String getAuthenticatorConfig() {
return authenticatorConfig;
}
public void setAuthenticatorConfig(String authenticatorConfig) {
this.authenticatorConfig = authenticatorConfig;
}
}
@@ -2,8 +2,12 @@ package org.keycloak.models.utils;
import org.keycloak.models.AuthenticationExecutionModel;
import org.keycloak.models.AuthenticationFlowModel;
import org.keycloak.models.AuthenticatorConfigModel;
import org.keycloak.models.RealmModel;
import java.util.HashMap;
import java.util.Map;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
@@ -73,6 +77,13 @@ public class DefaultAuthenticationFlows {
execution.setAutheticatorFlow(false);
realm.addAuthenticatorExecution(execution);
//AuthenticatorConfigModel captchaConfig = new AuthenticatorConfigModel();
//captchaConfig.setAlias("Recaptcha Config");
//Map<String, String> config = new HashMap<>();
//config.put("site.key", "6LcFEAkTAAAAAOaY-5RJk3zIYw4AalNtqfac27Bn");
//config.put("secret", "6LcFEAkTAAAAAM0SErEs9NlfhYpOTRj_vOVJSAMI");
//captchaConfig.setConfig(config);
//captchaConfig = realm.addAuthenticatorConfig(captchaConfig);
execution = new AuthenticationExecutionModel();
execution.setParentFlow(registrationFormFlow.getId());
execution.setRequirement(AuthenticationExecutionModel.Requirement.DISABLED);
@@ -80,6 +91,7 @@ public class DefaultAuthenticationFlows {
execution.setPriority(60);
execution.setUserSetupAllowed(false);
execution.setAutheticatorFlow(false);
//execution.setAuthenticatorConfig(captchaConfig.getId());
realm.addAuthenticatorExecution(execution);