newControllers.add(controller);
}
}
private static SPConfiguration toSPConfig(OperationContext context, ModelNode fromModel, String alias) throws OperationFailedException {
SPConfiguration spType = new SPConfiguration(alias);
String url = ServiceProviderResourceDefinition.URL.resolveModelAttribute(context, fromModel).asString();
spType.setServiceURL(url);
String securityDomain = ServiceProviderResourceDefinition.SECURITY_DOMAIN.resolveModelAttribute(context, fromModel).asString();
spType.setSecurityDomain(securityDomain);
boolean postBinding = ServiceProviderResourceDefinition.POST_BINDING.resolveModelAttribute(context, fromModel).asBoolean();
spType.setPostBinding(postBinding);
boolean supportsSignatures = ServiceProviderResourceDefinition.SUPPORT_SIGNATURES.resolveModelAttribute(context, fromModel).asBoolean();
spType.setSupportsSignature(supportsSignatures);
boolean supportsMetadata = ServiceProviderResourceDefinition.SUPPORT_METADATA.resolveModelAttribute(context, fromModel).asBoolean();
spType.setSupportMetadata(supportsMetadata);
boolean strictPostBinding = ServiceProviderResourceDefinition.STRICT_POST_BINDING.resolveModelAttribute(context, fromModel).asBoolean();
spType.setIdpUsesPostBinding(strictPostBinding);
String errorPage = ServiceProviderResourceDefinition.ERROR_PAGE.resolveModelAttribute(context, fromModel).asString();
spType.setErrorPage(errorPage);
String logoutPage = ServiceProviderResourceDefinition.LOGOUT_PAGE.resolveModelAttribute(context, fromModel).asString();
spType.setLogOutPage(logoutPage);
return spType;
}