{"repo":"xyproto/permissions2","free":true,"listed":false,"github":"https://github.com/xyproto/permissions2","clone":"git clone https://github.com/xyproto/permissions2.git","description":":closed_lock_with_key: Middleware for keeping track of users, login states and permissions","language":"Go","stars":509,"topics":["bcrypt","middleware","user-auth","permissions","redis","sessions"],"license":"BSD-3-Clause","category":"databases-storage","readme_excerpt":"Permissions2 Middleware for keeping track of users, login states and permissions. NOTE: permissions 3 is the continuation of this project. Online API Documentation godoc.org Features and limitations Uses secure cookies and stores user information in a Redis database. Suitable for running a local Redis server, registering/confirming users and managing public/user/admin pages. Also supports connecting to remote Redis servers. Does not support SQL databases. For MariaDB/MySQL support, look into permissionsql. For Bolt database support (no database host needed, uses a file), look into permissionbolt. For PostgreSQL database support (using the HSTORE feature), look into pstore. Supports registration and confirmation via generated confirmation codes. Tries to keep things simple. Only supports public , user and admin permissions out of the box, but offers functionality for implementing more fine grained permissions, if so desired. The default permissions can be cleared with the Clear() function. Supports Chi, Negroni, Martini, Gin, Goji and plain net/http . Should also work with other frameworks, since the standard http.HandlerFunc is used everywhere. Requirements Redis = 2.6.12 (or an open source Redis clone) Go = 1.25 Examples There is more information after the examples. Example for Chi go package main import ( \"fmt\" \"log\" \"net/http\" \"strings\" \"github.com/go-chi/chi/v5\" \"github.com/xyproto/permissions2/v2\" ) func main() { m := chi.NewRouter() // New permissions middleware perm, e","default_branch":null,"files":null,"tree":[],"storefront":"/r/xyproto","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/xyproto/permissions2/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}