https://github.com/gorilla/sessions
cookie go golang gorilla gorilla-web-toolkit sessions
Score: 32.8118100212097
Last synced: 1 day ago
JSON representation
Repository metadata:
Package gorilla/sessions provides cookie and filesystem sessions and infrastructure for custom session backends.
- Host: GitHub
- URL: https://github.com/gorilla/sessions
- Owner: gorilla
- License: bsd-3-clause
- Created: 2012-10-02T21:33:02.000Z (about 14 years ago)
- Default Branch: main
- Last Pushed: 2024-08-20T14:12:54.000Z (about 2 years ago)
- Last Synced: 2026-11-02T04:33:48.992Z (5 days ago)
- Topics: cookie, go, golang, gorilla, gorilla-web-toolkit, sessions
- Language: Go
- Homepage: https://gorilla.github.io
- Size: 125 KB
- Stars: 3,150
- Watchers: 50
- Forks: 383
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Owner metadata:
- Name: Gorilla web toolkit
- Login: gorilla
- Email: gorilla-maintainers@googlegroups.com
- Kind: organization
- Description: Gorilla is a web toolkit for the Go programming language that provides useful, composable packages for writing HTTP-based applications.
- Website: https://gorilla.github.io
- Location: The World
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/489566?v=4
- Repositories: 19
- Last Synced at: 2026-11-04T01:32:13.192Z
- Profile URL: https://github.com/gorilla
GitHub Events
Total
- Fork event: 11
- Issue comment event: 1
- Issues event: 2
- Pull request event: 3
- Watch event: 225
- Total: 242
Last Year
- Fork event: 2
- Watch event: 17
- Total: 19
Committers metadata
Last synced: 2 days ago
Total Commits: 125
Total Committers: 59
Avg Commits per committer: 2.119
Development Distribution Score (DDS): 0.824
Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0
| Name | Commits | |
|---|---|---|
| Matt Silverlock | m****t@e****t | 22 |
| Kamil Kisiel | k****l@k****t | 18 |
| Daniel Holmes | d****s@d****m | 7 |
| Corey Daley | c****y@r****m | 6 |
| Jonathan Gillham | j****m@g****m | 4 |
| kliron | k****n@g****m | 4 |
| Mark Dain | a****a | 3 |
| moraes | r****s@g****m | 3 |
| rcadena | r****a@g****m | 2 |
| Marius Orcsik | m****r | 2 |
| Keiji Yoshida | y****4@g****m | 2 |
| Dustin Oprea | m****r@g****m | 2 |
| Dmitry Chestnykh | d****y@c****m | 2 |
| Brian Jones | m****o@g****m | 2 |
| Niels Widger | n****s@q****m | 2 |
| Joe | 8****- | 1 |
| Jerry Saravia | S****J@g****m | 1 |
| James Cote | 3****h | 1 |
| Geofrey Ernest | g****t@l****m | 1 |
| Egon Elbre | e****e@g****m | 1 |
| Deniz Eren | d****6@g****m | 1 |
| Collin Stedman | k****n | 1 |
| Christian Muehlhaeuser | m****i@g****m | 1 |
| Bharat Rajani | b****i@g****m | 1 |
| Apoorva Jagtap | 3****p | 1 |
| Anton Lindström | l****r@g****m | 1 |
| Ahmadreza Zibaei | a****i@h****m | 1 |
| Adam Jack | a****k@g****m | 1 |
| secracon | s****n@g****m | 1 |
| Justin Clift | j****n@p****g | 1 |
| and 29 more... | ||
Issue and Pull Request metadata
Last synced: 2 days ago
Total issues: 79
Total pull requests: 67
Average time to close issues: 9 months
Average time to close pull requests: 3 months
Total issue authors: 71
Total pull request authors: 45
Average comments per issue: 4.49
Average comments per pull request: 2.28
Merged pull request: 31
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 11
Past year average time to close issues: N/A
Past year average time to close pull requests: about 6 hours
Past year issue authors: 0
Past year pull request authors: 8
Past year average comments per issue: 0
Past year average comments per pull request: 0.18
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- MichaelHipp (5)
- elithrar (4)
- jerlam06 (2)
- ciehanski (1)
- marksalpeter (1)
- Fruchtgummi (1)
- segevfiner (1)
- ghost (1)
- Xeoncross (1)
- swaroopdeval (1)
- asaqib27 (1)
- kramesh2005new (1)
- xujb977644703 (1)
- sadegh-shahbazi (1)
- cless (1)
Top Pull Request Authors
- coreydaley (7)
- mariusor (3)
- AdamMagued (3)
- elithrar (3)
- mbacalan (2)
- kashishbehl (2)
- danielepintore (2)
- c-tonneslan (2)
- hlpmenu (2)
- ryicoh (2)
- moloch-- (2)
- TheComputerM (2)
- JensvandeWiel (2)
- bharat-rajani (2)
- fednelpat (1)
Top Issue Labels
- stale (36)
- question (33)
- bug (17)
- documentation (7)
- enhancement (7)
- help wanted (3)
- breaking change (2)
- proposal (1)
- waiting on new maintainer (1)
Top Pull Request Labels
- stale (15)
- size/XS (13)
- size/M (9)
- size/S (8)
- documentation (4)
- breaking change (3)
- proposal (3)
- size/L (3)
- build system (2)
- bug (2)
- enhancement (2)
- needs review (1)
Package metadata
- Total packages: 17
- Total downloads: unknown
- Total docker downloads: 951,654,762
- Total dependent packages: 2,897 (may contain duplicates)
- Total dependent repositories: 15,256 (may contain duplicates)
- Total versions: 51
proxy.golang.org: github.com/gorilla/sessions
Package sessions provides cookie and filesystem sessions and infrastructure for custom session backends.
- Homepage: https://github.com/gorilla/sessions
- Documentation: https://pkg.go.dev/github.com/gorilla/sessions#section-documentation
- Licenses: BSD-3-Clause
- Latest release: v1.4.0 (published about 2 years ago)
- Last Synced: 2026-11-04T19:18:38.288Z (2 days ago)
- Versions: 8
- Dependent Packages: 2,897
- Dependent Repositories: 15,256
- Docker Downloads: 951,654,762
-
Rankings:
- Dependent repos count: 0.06%
- Dependent packages count: 0.063%
- Docker downloads count: 0.13%
- Average: 0.616%
- Stargazers count: 1.318%
- Forks count: 1.507%
proxy.golang.org: github.com/Gorilla/Sessions
- Homepage:
- Documentation: https://pkg.go.dev/github.com/Gorilla/Sessions#section-documentation
- Licenses: bsd-3-clause
- Latest release: v1.4.0 (published about 2 years ago)
- Last Synced: 2026-11-04T19:18:38.454Z (2 days ago)
- Versions: 8
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Stargazers count: 1.362%
- Forks count: 1.595%
- Average: 3.469%
- Dependent packages count: 5.283%
- Dependent repos count: 5.638%
proxy.golang.org: github.com/gorilla/Sessions
- Homepage:
- Documentation: https://pkg.go.dev/github.com/gorilla/Sessions#section-documentation
- Licenses: bsd-3-clause
- Latest release: v1.4.0 (published about 2 years ago)
- Last Synced: 2026-11-04T19:06:28.449Z (2 days ago)
- Versions: 8
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 1.622%
- Average: 4.057%
- Dependent packages count: 6.492%
proxy.golang.org: github.com/gorilla/sessionS
- Homepage:
- Documentation: https://pkg.go.dev/github.com/gorilla/sessionS#section-documentation
- Licenses: bsd-3-clause
- Latest release: v1.4.0 (published about 2 years ago)
- Last Synced: 2026-11-04T19:06:28.326Z (2 days ago)
- Versions: 8
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 4.846%
- Average: 5.009%
- Dependent repos count: 5.171%
proxy.golang.org: github.com/tekintian/go-sessions
Package sessions provides cookie and filesystem sessions and infrastructure for custom session backends. The key features are: Let's start with an example that shows the sessions API in a nutshell: First we initialize a session store calling NewCookieStore() and passing a secret key used to authenticate the session. Inside the handler, we call store.Get() to retrieve an existing session or a new one. Then we set some session values in session.Values, which is a map[interface{}]interface{}. And finally we call session.Save() to save the session in the response. Note that in production code, we should check for errors when calling session.Save(r, w), and either display an error message or otherwise handle it. Save must be called before writing to the response, otherwise the session cookie will not be sent to the client. That's all you need to know for the basic usage. Let's take a look at other options, starting with flash messages. Flash messages are session values that last until read. The term appeared with Ruby On Rails a few years back. When we request a flash message, it is removed from the session. To add a flash, call session.AddFlash(), and to get all flashes, call session.Flashes(). Here is an example: Flash messages are useful to set information to be read after a redirection, like after form submissions. There may also be cases where you want to store a complex datatype within a session, such as a struct. Sessions are serialised using the encoding/gob package, so it is easy to register new datatypes for storage in sessions: As it's not possible to pass a raw type as a parameter to a function, gob.Register() relies on us passing it a value of the desired type. In the example above we've passed it a pointer to a struct and a pointer to a custom type representing a map[string]interface. (We could have passed non-pointer values if we wished.) This will then allow us to serialise/deserialise values of those types to and from our sessions. Note that because session values are stored in a map[string]interface{}, there's a need to type-assert data when retrieving it. We'll use the Person struct we registered above: By default, session cookies last for a month. This is probably too long for some cases, but it is easy to change this and other attributes during runtime. Sessions can be configured individually or the store can be configured and then all sessions saved using it will use that configuration. We access session.Options or store.Options to set a new configuration. The fields are basically a subset of http.Cookie fields. Let's change the maximum age of a session to one week: Sometimes we may want to change authentication and/or encryption keys without breaking existing sessions. The CookieStore supports key rotation, and to use it you just need to set multiple authentication and encryption keys, in pairs, to be tested in order: New sessions will be saved using the first pair. Old sessions can still be read because the first pair will fail, and the second will be tested. This makes it easy to "rotate" secret keys and still be able to validate existing sessions. Note: for all pairs the encryption key is optional; set it to nil or omit it and and encryption won't be used. Multiple sessions can be used in the same request, even with different session backends. When this happens, calling Save() on each session individually would be cumbersome, so we have a way to save all sessions at once: it's sessions.Save(). Here's an example: This is possible because when we call Get() from a session store, it adds the session to a common registry. Save() uses it to save all registered sessions.
- Homepage: https://github.com/gorilla/sessions
- Status: removed
- Documentation: https://pkg.go.dev/github.com/tekintian/go-sessions#section-documentation
- Licenses: BSD-3-Clause
- Latest release: (published about 1 year ago)
- Last Synced: 2026-11-04T19:06:27.301Z (2 days ago)
- Versions: 0
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 7.332%
- Average: 7.577%
- Dependent repos count: 7.823%
proxy.golang.org: github.com/Gorilla/sessions
- Homepage:
- Documentation: https://pkg.go.dev/github.com/Gorilla/sessions#section-documentation
- Licenses: bsd-3-clause
- Latest release: v1.4.0 (published about 2 years ago)
- Last Synced: 2026-11-04T19:06:28.373Z (2 days ago)
- Versions: 8
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 6.999%
- Average: 8.173%
- Dependent repos count: 9.346%
ubuntu-23.10: golang-github-gorilla-sessions
- Homepage: https://github.com/gorilla/sessions
- Licenses: bsd-3-clause
- Latest release: 1.2.1-1 (published 9 months ago)
- Last Synced: 2026-08-29T16:29:41.517Z (2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-24.10: golang-github-gorilla-sessions
- Homepage: https://github.com/gorilla/sessions
- Licenses: bsd-3-clause
- Latest release: 1.2.1-1 (published 9 months ago)
- Last Synced: 2026-09-08T03:33:27.612Z (2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-22.04: golang-github-gorilla-sessions
- Homepage: https://github.com/gorilla/sessions
- Licenses: bsd-3-clause
- Latest release: 1.1+git20170802.7.b61c93c-4 (published 9 months ago)
- Last Synced: 2026-08-03T04:06:47.519Z (3 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-12: golang-github-gorilla-sessions
- Homepage: https://github.com/gorilla/sessions
- Documentation: https://packages.debian.org/bookworm/golang-github-gorilla-sessions
- Licenses: bsd-3-clause
- Latest release: 1.2.1-1 (published 9 months ago)
- Last Synced: 2026-03-12T20:12:20.687Z (8 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-23.04: golang-github-gorilla-sessions
- Homepage: https://github.com/gorilla/sessions
- Licenses: bsd-3-clause
- Latest release: 1.2.1-1 (published 9 months ago)
- Last Synced: 2026-03-11T21:31:39.303Z (8 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-20.04: golang-github-gorilla-sessions
- Homepage: https://github.com/gorilla/sessions
- Licenses: bsd-3-clause
- Latest release: 1.1+git20170802.7.b61c93c-3 (published 9 months ago)
- Last Synced: 2026-08-30T15:29:46.419Z (2 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-10: golang-github-gorilla-sessions
- Homepage: https://github.com/gorilla/sessions
- Documentation: https://packages.debian.org/buster/golang-github-gorilla-sessions
- Licenses: bsd-3-clause
- Latest release: 1.1+git20170802.7.b61c93c-3 (published 9 months ago)
- Last Synced: 2026-03-13T07:05:02.803Z (8 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
guix: go-github-com-gorilla-sessions
Manage user sessions in web applications
- Homepage: https://github.com/gorilla/sessions
- Documentation: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/golang-web.scm#n7098
- Licenses: bsd-3
- Latest release: 1.2.1 (published 8 months ago)
- Last Synced: 2026-08-01T02:02:24.426Z (3 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-13: golang-github-gorilla-sessions
- Homepage: https://github.com/gorilla/sessions
- Documentation: https://packages.debian.org/trixie/golang-github-gorilla-sessions
- Licenses: bsd-3-clause
- Latest release: 1.2.1-1 (published 9 months ago)
- Last Synced: 2026-03-13T20:10:48.034Z (8 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-24.04: golang-github-gorilla-sessions
- Homepage: https://github.com/gorilla/sessions
- Licenses: bsd-3-clause
- Latest release: 1.2.1-1 (published 9 months ago)
- Last Synced: 2026-08-13T18:01:24.313Z (3 months ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-11: golang-github-gorilla-sessions
- Homepage: https://github.com/gorilla/sessions
- Documentation: https://packages.debian.org/bullseye/golang-github-gorilla-sessions
- Licenses: bsd-3-clause
- Latest release: 1.1+git20170802.7.b61c93c-4 (published 9 months ago)
- Last Synced: 2026-09-24T20:27:46.042Z (about 1 month ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%