Skip to content

Conversation

@orirawlings
Copy link

Fixes #29

This PR adds a new option, PersistSessionCookies to the Option struct. This allows users to persist both cookies with an expiry time, and those without. By default session cookies are not persisted (which matches current behavior), nor will any session cookies that appear in the serialized cookies on disk be loaded into the jar.

This PR is motivated by usage of the library within command line tools. In the motivating cases, the user might execute a series of separate commands in their terminal. Each command runs as a separate OS process, so they do not share memory, but they still span a logical session with a web API. Allowing session cookies to be persisted allows that session to continue over the sequence of commands.

@orirawlings
Copy link
Author

Looks like #31 was opened between when I originally developed this and worked through legal department at my employer. I think either solution would address my use case. Hopefully, one of them can be integrated. :)

@orirawlings
Copy link
Author

cc @rogpeppe

@naiba
Copy link

naiba commented Apr 28, 2019

I need this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Save / serialize session cookies

3 participants