Details
-
Documentation
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
Description
This is the documentation in this section:-
http://shiro.apache.org/session-management.html#using-sessions
Like almost everything else in Shiro, you acquire a Session by interacting with the currently executing Subject:
Subject currentUser = SecurityUtils.getSubject(); Session session = currentUser.getSession(); session.setAttribute( "someKey", someValue);
The subject.getSession() method is a shortcut for calling currentUser.getSubject(true).
The variable subject does not exist in the code example. Did I misunderstand what the documentation was trying to say?