From f584d41a2f0eeb9d7e709c446618565eb8711d33 Mon Sep 17 00:00:00 2001 From: Giulio De Donato Date: Thu, 22 Jan 2015 13:22:48 +0100 Subject: [PATCH] bug fixes --- jwt/jwt.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jwt/jwt.go b/jwt/jwt.go index 73cac97..78f949e 100644 --- a/jwt/jwt.go +++ b/jwt/jwt.go @@ -9,8 +9,7 @@ import ( func Auth(secret string) gin.HandlerFunc { return func(c *gin.Context) { _, err := jwt_lib.ParseFromRequest(c.Request, func(token *jwt_lib.Token) (interface{}, error) { - var b bytes.Buffer - b.Write([]byte(secret)) + b := []byte(secret) return b, nil })