From 68629768cbb7c86fd4b118e7d555450297f3fb8a Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 29 Jan 2023 20:45:43 +0530 Subject: moved refresh mechanism to package auth --- util/authorize.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/authorize.go b/util/authorize.go index ca6660e..6fb7a0c 100644 --- a/util/authorize.go +++ b/util/authorize.go @@ -53,7 +53,7 @@ func Authorize() gin.HandlerFunc { } // generate new access token -func newAccessToken(userId string) (string, error) { +func NewAccessToken(userId string) (string, error) { claims := jwt.NewWithClaims(jwt.SigningMethodHS256, jwt.StandardClaims{ Issuer: userId, ExpiresAt: time.Now().Add(time.Second * 15).Unix(), -- cgit v1.2.3