+ ", Principal identity: " + System.identityHashCode(principal));
if (principal instanceof WSLCPrincipal) // This code path is hit if this login command handled authentication.
{
ContextManager contextManager = ((WSLCPrincipal)principal).getContextManager();
UserRegistry registry = contextManager.getRegistry(contextManager.getDefaultRealm());
try
{
List groups = new ArrayList(registry.getGroupsForUser(principal.getName()));
groups.retainAll(roles);
// if authorization succeeds, set the user's Subject on this invocation context
// so that the rest of the Thread is executed in the context of the appropriate Subject