@weavejester thanks I just grabbed (first and (second ...
I feel bad to ask so many questions to you, but I have one more...
how can I write directly to the session? is the session data stored on the clientside?
I want to change the session data via sente event, which does have a ring-map but i don't think affecting the incoming copy of the ring parameters would do anything to the session. it seems like a redirect / url shift would be required to change session data w/ my understanding at this point
@sova It depends how you’re storing the session.
What session store are you using?
@weavejester i want to write directly to the ring session, as part of the map, if possible. my current scheme just stores at atom in the clientside of login email, login time, and hash.
user submits info over socket -> gets authentication information over socket
but I want to make sure that if a user navigated to say /article/:whatever they would still have their login creds active. writing to localStorage won't persist this if the user has localStorage disabled, so i am thinking having ring session as a directory-level fallback
does my approach make sense? maybe the authentication can all be ring session level...
to be honest, i was not aware that there are different ways to store the session. what are the alternatives? (googles furiously)
@sova Sessions persist over requests, so they require some form of storage. By default, Ring provides two stores: an in-memory atom held on the server, and through encrypted cookies. You can also use third-party stores, or write your own, that store sessions on the filesystem or in a database.
You can access the store directly to update the session in most cases. Cookie stores are an exception, since they require a HTTP response.
If you want to have the session stored when the user logs in via a session, you need some way of setting a cookie. I believe you could do this via an XHR, or you could grab the value of the session cookie and set it with Java/Clojurescript instead.