Session.stop

Explicitly stops (invalidates) this session and releases all associated resources. <p/> If this session has already been authenticated (i.e. the {@code Subject} that owns this session has logged-in), calling this method explicitly might have undesired side effects: <p/> It is common for a {@code Subject} implementation to retain authentication state in the {@code Session}. If the session is explicitly stopped by application code by calling this method directly, it could clear out any authentication state that might exist, thereby effectively &quot;unauthenticating&quot; the {@code Subject}. <p/> As such, you might consider {@link hunt.shiro.subject.Subject#logout logging-out} the 'owning' {@code Subject} instead of manually calling this method, as a log out is expected to stop the corresponding session automatically, and also allows framework code to execute additional cleanup logic.

@throws InvalidSessionException if this session has stopped or expired prior to calling this method.

interface Session
void
stop
()

Meta