Saves the subject's state (it's principals and authentication state) to its
{@link hunt.shiro.subject.Subject#getSession() session}. The session can be retrieved at a later time
(typically from a {@link hunt.shiro.session.mgt.SessionManager SessionManager} to be used to recreate
the {@code Subject} instance.
@param subject the subject for which state will be persisted to its session.
Saves the subject's state (it's principals and authentication state) to its {@link hunt.shiro.subject.Subject#getSession() session}. The session can be retrieved at a later time (typically from a {@link hunt.shiro.session.mgt.SessionManager SessionManager} to be used to recreate the {@code Subject} instance.
@param subject the subject for which state will be persisted to its session.