DOI-USGS / sbtools

Tools for interfacing R with ScienceBase data services.
http://doi-usgs.github.io/sbtools/
Creative Commons Zero v1.0 Universal
21 stars 21 forks source link

refresh birthday of session attribute with successful POST or GET #77

Closed jordansread closed 8 years ago

jordansread commented 9 years ago

internal tracking of session stale should be re-upped here.

jordansread commented 9 years ago

This is in place, but is not used. The trouble is sessions that can come from package or be passed in as an arg. I can reset the age if it is a package var, but the user passed in session doesn't get returned after being modified, so that is pointless.

jordansread commented 9 years ago

"I promised to update you about a "keep-alive" or "ping" method. We do have a ping REST endpoint you can use see if ScienceBase is there, https://www.sciencebase.gov/catalog/item/ping?format=json. For a keep-alive, it turns out the session info URL above works the best: https://www.sciencebase.gov/catalog/jossoHelper/sessionInfo. If you also have your josso parameter set, that will return isLoggedIn: true, as well as reset the session timer.

I've uploaded a new version of pysb with these features implemented, if you want to look at a code example. There is also a new logout() method, and I implemented the bulk delete we discussed."

sckott commented 8 years ago

If you also have your josso parameter set, that will return isLoggedIn: true, as well as reset the session timer.

note that I use this in the proposed fxn in https://github.com/USGS-R/sbtools/issues/137#issuecomment-166769301

jordansread commented 8 years ago

@sckott so we would get rid of the session birthdate concept in favor of sb_ping? Or would we end up using both?