}
if (config.hasDefined(ModelKeys.AUTHENTICATION) && config.get(ModelKeys.AUTHENTICATION, ModelKeys.AUTHENTICATION_NAME).isDefined()) {
ModelNode authentication = config.get(ModelKeys.AUTHENTICATION, ModelKeys.AUTHENTICATION_NAME);
EndpointUtils.addSecurityRealmDependency(builder, authentication.get(ModelKeys.SECURITY_REALM).asString(), service.getAuthenticationSecurityRealm());
if (authentication.hasDefined(ModelKeys.SASL) && authentication.get(ModelKeys.SASL, ModelKeys.SASL_NAME).isDefined()) {
AuthenticationConfigurationBuilder authenticationBuilder = configurationBuilder.authentication();
ModelNode sasl = authentication.get(ModelKeys.SASL, ModelKeys.SASL_NAME);
if (sasl.hasDefined(ModelKeys.SERVER_CONTEXT_NAME)) {
String serverContextName = sasl.get(ModelKeys.SERVER_CONTEXT_NAME).asString();
service.setServerContextName(serverContextName);
EndpointUtils.addSecurityDomainDependency(builder, serverContextName, service.getSaslSecurityDomain()); // FIXME: needed ???