You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Kamal (JIRA)" <ji...@apache.org> on 2017/05/04 02:55:04 UTC

[jira] [Created] (SHIRO-622) Session Management page - Incorrect variable name in example

Kamal created SHIRO-622:
---------------------------

             Summary: Session Management page - Incorrect variable name in example 
                 Key: SHIRO-622
                 URL: https://issues.apache.org/jira/browse/SHIRO-622
             Project: Shiro
          Issue Type: Documentation
            Reporter: Kamal


This is the documentation in this section:-

http://shiro.apache.org/session-management.html#using-sessions

{quote}
Like almost everything else in Shiro, you acquire a Session by interacting with the currently executing Subject:

{code}
Subject currentUser = SecurityUtils.getSubject();

Session session = currentUser.getSession();
session.setAttribute( "someKey", someValue);
{code}

The subject.getSession() method is a shortcut for calling currentUser.getSubject(true).
{quote}

The variable subject does not exist in the code example.  Did I misunderstand what the documentation was trying to say?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)