Package edu.wisc.game.web
Class SessionData
java.lang.Object
edu.wisc.game.web.SessionData
A single instance of this class is associated with a particular
session of the Rule Game web app.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static SessionData
getSessionData
(jakarta.servlet.http.HttpServletRequest request) Looks up the SessionData object already associated with the current session, or creates a new one.Unlike getRemoteUser(), this method does not recheck the extended session cookie.void
storeUserInfo
(User user, boolean _passwordMatched) Saves the user name (received from the [validated] login form, or recovered via a persistent cookie) into the session's memory.toString()
-
Method Details
-
toString
-
getSessionData
Looks up the SessionData object already associated with the current session, or creates a new one. This is done atomically, synchronized on the session object.This can also be used in command-like app with simulated session, when this method will simply create a new dummy SessionData object.
- Parameters:
request
- The current HTTP request (or null in a command-like app with simulated session).
-
getStoredUserName
Unlike getRemoteUser(), this method does not recheck the extended session cookie. It is safe to use if we know that getRemoteUser() has been recently called. -
getStoredDisplayName
-
getPasswordMatched
public boolean getPasswordMatched() -
storeUserInfo
Saves the user name (received from the [validated] login form, or recovered via a persistent cookie) into the session's memory.
-