You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by nateorus <Na...@pdinh.com> on 2013/02/27 15:57:26 UTC

Multiple Realms: how to retain name of authenticating realm on session

I am developing an application with multiple realms. I've extended JdbcRealm
and JndiLdapRealm classes with custom implementations, and it's all working
great.  However, it's important for the application to know which Realm the
Subject was authenticated against.  I want to add this to the session like
this:

subject.login(token);
subject.getSession().setAttribute("realmname", realmname);

As far as i can tell, looking at the API there is no way to access this
information from the logged in Subject instance.  Nor is there a way for the
Realm to access the session during the authentication process.

Sorry in advance if i am missing something obvious.  Any suggestions are
greatly appreciated.



--
View this message in context: http://shiro-user.582556.n2.nabble.com/Multiple-Realms-how-to-retain-name-of-authenticating-realm-on-session-tp7578298.html
Sent from the Shiro User mailing list archive at Nabble.com.