Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor all stores to remove the simplesessions dependency and adhere #31

Merged
merged 1 commit into from
May 10, 2024

Conversation

knadh
Copy link
Collaborator

@knadh knadh commented May 10, 2024

to the new simplesessions/v2 interface methods. This is a breaking change.`

This commit also refactors securestore and changes its behaviour.

This store is peculiar because it does not actually have a persistent backend store and instead uses the session/cookie ID string (value) itself as the encoded store. The older version thus relied on Session{} to write the cookie to the frontend, which is not ideal.

This version removes the dependency and leaves the actual cookie writing to the implementer. This commit introduces a new Flush() method that returns the encoded values set using Set(), which the implementer can then write to a cookie externally (with a Session.WriteCookie()).

to the new `simplesessions/v2` interface methods. This is a breaking
change.`

This commit also refactors securestore and changes its behaviour.

This store is peculiar because it does not actually have a persistent
backend store and instead uses the session/cookie ID string (value)
itself as the encoded store. The older version thus relied on Session{}
to write the cookie to the frontend, which is not ideal.

This version removes the dependency and leaves the actual cookie writing
to the implementer. This commit introduces a new `Flush()` method that
returns the encoded values set using Set(), which the implementer can
then write to a cookie externally (with a `Session.WriteCookie()`).
@vividvilla vividvilla merged commit 3214678 into master May 10, 2024
8 checks passed
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.

2 participants