travelgateX / go-jwt-tools

Golang authorization middleware for JWT tokens. JWT tools
http://www.travelgatex.com
GNU General Public License v3.0
9 stars 9 forks source link

ContextKey created #3

Closed NicoGonMu closed 6 years ago

NicoGonMu commented 6 years ago

On #2, the constant PERMISSION was removed. A refactorization is great, but I think it is necessary for an external use of the PermissionTable to have access to that constant from an external package.

For this reason, I created a new constant, ContextKey, with the improvement that its type is a private subtype of string defined on authorization.go.

With this changes, another library will be able to reference the constant and furthermore, it will be unique, avoiding possible conflicts.