You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We track the user that is associated with a ConnectionSignature, which is returned by the run method. That can be used as a key to store session information, although it can change, so is awkward on the application side. The get_user method returns the user logged in on that session, if any.
What @jolhoeft is thinking of is something to replace the run method, say get_connection, that returns an enum:
We include the ConnectionSignature in the logged in case so the application can migrate information after the user logs in (or more likely, creates an account).
This can all be done on the application side now, but is a bit messy, and seems a common use case.
which consumes c, and returns a ConnectionType::LoggedIn if the user was not zero-length (otherwise it gives you back a ConnectionType::Anonymous again).
The text was updated successfully, but these errors were encountered:
FWIW, the get_user method was designed to differentiate between logged-in users and anonymous users (as well as to identify the logged-in user specifically).
I sort of feel like this could be managed equally well with a "is this session authenticated" boolean that lives in the application, but if we want to own session variables, this is the right path to take.
Also I think we should own session variables, since this is "websession.rs", not "weblogin.rs".
From #3:
We track the user that is associated with a
ConnectionSignature
, which is returned by therun
method. That can be used as a key to store session information, although it can change, so is awkward on the application side. Theget_user
method returns the user logged in on that session, if any.What @jolhoeft is thinking of is something to replace the
run
method, sayget_connection
, that returns an enum:We include the
ConnectionSignature
in the logged in case so the application can migrate information after the user logs in (or more likely, creates an account).This can all be done on the application side now, but is a bit messy, and seems a common use case.
We'll also need:
which consumes
c
, and returns aConnectionType::LoggedIn
if theuser
was not zero-length (otherwise it gives you back aConnectionType::Anonymous
again).The text was updated successfully, but these errors were encountered: