diff --git a/integration/keycloak-as7-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialAddHandler.java b/integration/keycloak-as7-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialAddHandler.java index a6bb63ec61..51bde28214 100755 --- a/integration/keycloak-as7-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialAddHandler.java +++ b/integration/keycloak-as7-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialAddHandler.java @@ -40,7 +40,7 @@ public class CredentialAddHandler extends AbstractAddStepHandlerWithAttributes { @Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List> newControllers) throws OperationFailedException { KeycloakAdapterConfigService ckService = KeycloakAdapterConfigService.find(context); - ckService.addCredential(operation, model); + ckService.addCredential(operation, context.resolveExpressions(model)); } } diff --git a/integration/keycloak-as7-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmAddHandler.java b/integration/keycloak-as7-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmAddHandler.java index df393523cf..0d4a5d86d1 100755 --- a/integration/keycloak-as7-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmAddHandler.java +++ b/integration/keycloak-as7-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmAddHandler.java @@ -61,6 +61,6 @@ public final class RealmAddHandler extends AbstractAddStepHandler { @Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List> newControllers) throws OperationFailedException { KeycloakAdapterConfigService ckService = KeycloakAdapterConfigService.find(context); - ckService.addRealm(operation, model); + ckService.addRealm(operation, context.resolveExpressions(model)); } } diff --git a/integration/keycloak-as7-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentAddHandler.java b/integration/keycloak-as7-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentAddHandler.java index b5b518aaad..99267dbe18 100755 --- a/integration/keycloak-as7-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentAddHandler.java +++ b/integration/keycloak-as7-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentAddHandler.java @@ -56,6 +56,6 @@ public final class SecureDeploymentAddHandler extends AbstractAddStepHandler { @Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List> newControllers) throws OperationFailedException { KeycloakAdapterConfigService ckService = KeycloakAdapterConfigService.find(context); - ckService.addSecureDeployment(operation, model); + ckService.addSecureDeployment(operation, context.resolveExpressions(model)); } } diff --git a/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialAddHandler.java b/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialAddHandler.java index 63c78a721c..c3c37fa63c 100755 --- a/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialAddHandler.java +++ b/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialAddHandler.java @@ -41,7 +41,7 @@ public class CredentialAddHandler extends AbstractAddStepHandler { @Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List> newControllers) throws OperationFailedException { KeycloakAdapterConfigService ckService = KeycloakAdapterConfigService.find(context); - ckService.addCredential(operation, model); + ckService.addCredential(operation, context.resolveExpressions(model)); } } diff --git a/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakAdapterConfigDeploymentProcessorAS7.java b/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakAdapterConfigDeploymentProcessorEAP6.java similarity index 97% rename from integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakAdapterConfigDeploymentProcessorAS7.java rename to integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakAdapterConfigDeploymentProcessorEAP6.java index 39c6ec10cb..77261ba311 100755 --- a/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakAdapterConfigDeploymentProcessorAS7.java +++ b/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakAdapterConfigDeploymentProcessorEAP6.java @@ -35,15 +35,15 @@ import java.util.List; /** * Pass authentication data (keycloak.json) as a servlet context param so it can be read by the KeycloakServletExtension. - * This is used for AS7/EAP6. + * This is used for EAP6. * * @author Stan Silvert ssilvert@redhat.com (C) 2014 Red Hat Inc. */ // Note: Even though this class closely resembles the WildFly KeycloakAdapterConfigDeploymentProcessor // it can not be easily refactored because the WarMetaData classes are of different types. -public class KeycloakAdapterConfigDeploymentProcessorAS7 implements DeploymentUnitProcessor { - protected Logger log = Logger.getLogger(KeycloakAdapterConfigDeploymentProcessorAS7.class); +public class KeycloakAdapterConfigDeploymentProcessorEAP6 implements DeploymentUnitProcessor { + protected Logger log = Logger.getLogger(KeycloakAdapterConfigDeploymentProcessorEAP6.class); @Override public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { diff --git a/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakDependencyProcessorAS7.java b/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakDependencyProcessorEAP6.java similarity index 92% rename from integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakDependencyProcessorAS7.java rename to integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakDependencyProcessorEAP6.java index d1b76988e4..7c084d11d1 100755 --- a/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakDependencyProcessorAS7.java +++ b/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakDependencyProcessorEAP6.java @@ -23,11 +23,11 @@ import org.jboss.modules.ModuleIdentifier; import org.jboss.modules.ModuleLoader; /** - * Adds platform-specific modules for AS7 + * Adds platform-specific modules for EAP6 * * @author Stan Silvert ssilvert@redhat.com (C) 2014 Red Hat Inc. */ -public class KeycloakDependencyProcessorAS7 extends KeycloakDependencyProcessor { +public class KeycloakDependencyProcessorEAP6 extends KeycloakDependencyProcessor { private static final ModuleIdentifier KEYCLOAK_AS7_ADAPTER = ModuleIdentifier.create("org.keycloak.keycloak-as7-adapter"); diff --git a/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakSubsystemAdd.java b/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakSubsystemAdd.java index bd12110e54..0a490042be 100755 --- a/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakSubsystemAdd.java +++ b/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakSubsystemAdd.java @@ -70,7 +70,7 @@ class KeycloakSubsystemAdd extends AbstractBoottimeAddStepHandler { if (Environment.isWildFly()) { return new KeycloakDependencyProcessorWildFly(); } else { - return new KeycloakDependencyProcessorAS7(); + return new KeycloakDependencyProcessorEAP6(); } } @@ -78,7 +78,7 @@ class KeycloakSubsystemAdd extends AbstractBoottimeAddStepHandler { if (Environment.isWildFly()) { return new KeycloakAdapterConfigDeploymentProcessor(); } else { - return new KeycloakAdapterConfigDeploymentProcessorAS7(); + return new KeycloakAdapterConfigDeploymentProcessorEAP6(); } } diff --git a/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmAddHandler.java b/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmAddHandler.java index df393523cf..0d4a5d86d1 100755 --- a/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmAddHandler.java +++ b/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmAddHandler.java @@ -61,6 +61,6 @@ public final class RealmAddHandler extends AbstractAddStepHandler { @Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List> newControllers) throws OperationFailedException { KeycloakAdapterConfigService ckService = KeycloakAdapterConfigService.find(context); - ckService.addRealm(operation, model); + ckService.addRealm(operation, context.resolveExpressions(model)); } } diff --git a/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentAddHandler.java b/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentAddHandler.java index b5b518aaad..99267dbe18 100755 --- a/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentAddHandler.java +++ b/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentAddHandler.java @@ -56,6 +56,6 @@ public final class SecureDeploymentAddHandler extends AbstractAddStepHandler { @Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List> newControllers) throws OperationFailedException { KeycloakAdapterConfigService ckService = KeycloakAdapterConfigService.find(context); - ckService.addSecureDeployment(operation, model); + ckService.addSecureDeployment(operation, context.resolveExpressions(model)); } } diff --git a/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/authserver/AuthServerAddHandler.java b/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/authserver/AuthServerAddHandler.java index fd3fcddda5..591718e8b1 100755 --- a/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/authserver/AuthServerAddHandler.java +++ b/integration/keycloak-subsystem/src/main/java/org/keycloak/subsystem/extension/authserver/AuthServerAddHandler.java @@ -51,6 +51,7 @@ public final class AuthServerAddHandler extends AbstractAddStepHandler { for (AttributeDefinition attr : AuthServerDefinition.ALL_ATTRIBUTES) { attr.validateAndSet(operation, model); } + model = context.resolveExpressions(model); // returns early if on domain controller if (!requiresRuntime(context)) return;