Add owner attribute to Keycloak server deployment

This commit is contained in:
Stan Silvert 2015-04-09 14:52:47 -04:00
parent bbef4e2be1
commit 875aae91fc

View file

@ -46,6 +46,7 @@ import org.jboss.dmr.ModelNode;
import org.jboss.modules.Module;
import org.jboss.modules.ModuleIdentifier;
import org.jboss.modules.ModuleLoadException;
import org.keycloak.subsystem.extension.KeycloakExtension;
/**
* Utility methods that help assemble and start an auth server.
@ -105,6 +106,9 @@ public class AuthServerUtil {
op.get(ENABLED).set(isEnabled);
op.get(PERSISTENT).set(false); // prevents writing this deployment out to standalone.xml
// Owner attribute is valid starting with WidlFly 9. Ignored in WildFly 8
op.get("owner").set(new ModelNode().add("subsystem", KeycloakExtension.SUBSYSTEM_NAME));
if (authServerUri == null) {
throw new OperationFailedException("Keycloak Auth Server WAR not found in keycloak-subsystem module");
}