shiro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Les Hazlewood <lhazlew...@apache.org>
Subject Re: How to know if exists a shiro session from a browser perspective ?
Date Wed, 08 Feb 2012 17:50:28 GMT
You can use whatever mechanism you want (e.g. create a JSP tag, or in
a scriptlet) to call:

SecurityUtils.getSubject().getSession(false)

http://shiro.apache.org/static/current/apidocs/org/apache/shiro/subject/Subject.html#getSession(boolean)

Regards,

Les

On Wed, Feb 8, 2012 at 2:44 AM, Cristiano GaviĆ£o <cvgaviao@gmail.com> wrote:
> Hi,
>
> I'm developing a integration test for my application using selenium2 +
> webdriver.
>
> At code I test if the user is authenticated using: subject.isAuthenticated()
> when the home page is called. If he is not, then he is forwarded for the
> login page.
>
> I would like to simulate such situation. So anyone knows if there is a way
> to know (from a browser perspective) if there is or not a shiro session ?
>
> thanks
>
> Cristiano

Mime
View raw message