sessions

Minimalist Go sessions with a secure cookie Store implementation

MIT License

Stars
26

Bot releases are visible (Hide)

sessions - v0.4.1 Latest Release

Published by dghubble 8 months ago

What's New

  • Update Go module dependencies and add configure changelog generator

Contributions

Dependencies

New Contributors

Full Changelog: https://github.com/dghubble/sessions/compare/v0.4.0...v0.4.1

sessions - v0.4.0

Published by dghubble almost 2 years ago

  • Allow Session to store values with specified type (V) (i.e. generics) (#21)
    • Session state is now a map[string]V instead of a map[string]any
    • Update Set, Get, and GetOk methods to use generic type V
    • Change Session to Session[V any] to specify the type of value stored in the Session
    • See updated usage docs for examples
  • Change Store to Store[V any] to specify the type of value stored in sessions
  • Change NewCookieStore to NewCookieStore[V any] to specify the type of value stored in sessions
sessions - v0.3.1

Published by dghubble almost 2 years ago

  • Change DefaultCookieConfig to use SameSiteLaxMode (#22)
sessions - v0.3.0

Published by dghubble almost 2 years ago

  • Change CookieStore and its fields to be non-exported (#19)
    • Change NewCookieStore to require a *CookieConfig and return a Store
    • Rename Config struct to CookieConfig
    • Add DefaultCookieConfig and DebugCookieConfig convenience variables
  • Change the Session field Values to be non-exported (#18)
    • Add Session Set method to set a key/value pair
    • Add Session Get method to get a value for a given key
    • Add Session GetOk to get a value for a given key and whether the key exists in the map
  • Remove cookie Config field from Session (#17)
  • Add examples and project logo to README
sessions - v0.2.1

Published by dghubble almost 2 years ago

  • Update minimum Go version from v1.17 to v1.18 (#15)
sessions - v0.2.0

Published by dghubble about 3 years ago

  • Fix go.mod to include gorilla/securecookie (#7)
sessions - v0.1.0

Published by dghubble over 5 years ago

  • Initial release
  • Require Go v1.11+