I have a webapp deployed with Tomcat (8.0.32) and the login/logout operations work fine with each redeployment. However they do not work so well if I stop Catalina without redeploying the webapp (./catalina.sh stop
and then ./catalina.sh start
without any changes to the contents of the webapp folder). What happens is that method org.apache.shiro.subject.Subject.isAuthenticated()
returns true
right after the server starts but before the new login operation takes place.
More specifically, my implementation of javax.servlet.Filter.doFilter
starts with the following line:
if(org.apache.shiro.SecurityUtils.getSubject().isAuthenticated()) ...
which returns true right after the server restarted but before the new login. Shiro's version is 1.3.0.
Therefore I was wondering if I am missing something, e.g. is there any operation that must be performed before, or is this the wrong way to use this method? Thank you for your attention.