if (logger.isTraceEnabled()) {
logger.trace("Roles determined for username=" + username + "=" + Arrays.toString(roles.toArray()));
}
// Map to JBoss specific principal
if ((new ServerDetector()).isJboss() || jbossEnv) {
// Push a context
ServiceProviderSAMLContext.push(username, roles);
principal = context.getRealm().authenticate(username, password);
ServiceProviderSAMLContext.clear();
} else {