HI Richard,

You can find which principals come from which realms by calling
principalCollection.fromRealm(realmName);

Realms typically don't create sessions - they're usually DAOs to a data
store.  Application code or client-specific concepts (HTTP request
controllers or filters, etc) typically create sessions.

Does this make sense?  I think I'm missing something...

Regards,

--
Les Hazlewood | @lhazlewood
CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282


On Fri, Dec 6, 2013 at 3:35 PM, [email protected]
<[email protected]>wrote:

> Hi.
>
> I might be going about this wrong, but here is basically what I want to do:
> allow an administrative user in a given realm to manage (CRUD) roles for
> that realm.  My system has multiple realms.
>
> Once this user is logged in, I can get access to the user via
> SecurityUtils.getSubject() and their session via
> SecurityUtils.getSubject().getSession(), but how do I find which realm
> created that session?  I have not been able to find anything built into
> Shiro to let me find the corresponding realm.  Once I have that, setting
> the
> managing the roles seems straightforward.
>
> Thanks
> + Richard
>
>
>
>
> --
> View this message in context:
> http://shiro-user.582556.n2.nabble.com/How-to-find-the-realm-that-created-a-session-tp7579440.html
> Sent from the Shiro User mailing list archive at Nabble.com.
>

Reply via email to