LoginConfig login = new LoginConfig("ApplicationRealm").addFirstAuthMethod(authMethod);
deployment.setLoginConfig(login);
deployment.addSecurityRole("REST");
SecurityDomainContext securityDomainContext = securityDomainContextInjector.getValue();
deployment.setIdentityManager(new JAASIdentityManagerImpl(securityDomainContext));
// Commented waiting for WFLY-2553
/*if ("SPNEGO".equals(authMethod)) {
context.addValve(new NegotiationAuthenticator());
}*/