Hi,

You need to jump through some hoops but I think you can get it something
like:

>From the session attributes get
DefaultSessionContext.PRINCIPALS_SESSION_KEY which will return a
SimplePrincipalCollection call getRealmNames().

I have not done it and it might depend on how the session was built.

Good luck.

Cheers,

Stuart
 On 6 Dec 2013 23:35, "[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