Hi Les,

Thanks for your insight...

I went back to my original method:

  public Subject getSubjectByLogin(final String login) {
                PrincipalCollection principals = new
SimplePrincipalCollection(login, REALM_NAME);
                return new
Subject.Builder().principals(principals).buildSubject();
        } 

and I now see that the buildSubject() portion is throwing this exception:

      SessionContext must be an HTTP compatible implementation.

and I suppose this is the root of my problems.  Are you surprised this code
works for Shiro 1.1?

Are you suggesting that I add a method to my realm, such as hasRole(login)
and I would not even use the Subject object?  

(In our app, we have a backoffice area where we display users and their
roles.  It seems like a common use case to me!)

Thanks again,
Dan



--
View this message in context: 
http://shiro-user.582556.n2.nabble.com/Subject-being-changed-tp7370203p7370381.html
Sent from the Shiro User mailing list archive at Nabble.com.

Reply via email to