Skip to content

Commit

Permalink
Fixed a typo in JWT package (go-kit#1071)
Browse files Browse the repository at this point in the history
	* define JWTContextKey as a new constant

        * mark JWTTokenContextKey as a deprecated constant

        * revise corresponding error messages
  • Loading branch information
Amid committed Jun 2, 2021
1 parent ce02833 commit 2279904
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions auth/jwt/middleware.go
Expand Up @@ -12,9 +12,14 @@ import (
type contextKey string

const (
// JWTContextKey holds the key used to store a JWT in the
// context.
JWTContextKey contextKey = "JWT"
// JWTContextKey holds the key used to store a JWT in the context.
JWTContextKey contextKey = "JWTToken"

// JWTTokenContextKey is an alias for JWTContextKey.
//
// Deprecated: only exists for historical compatibility.
// JWTContextKey would be preferable.
JWTTokenContextKey = JWTContextKey

// JWTClaimsContextKey holds the key used to store the JWT Claims in the
// context.
Expand Down

0 comments on commit 2279904

Please sign in to comment.