summaryrefslogtreecommitdiff
path: root/util/authorize.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2023-01-29 20:45:43 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2023-01-29 20:45:43 +0530
commit68629768cbb7c86fd4b118e7d555450297f3fb8a (patch)
treee5bb06635ddf50bc58e25bae931ac453a28f844a /util/authorize.go
parent7ee07197f4fc5806e72a1aefd49c7a448c600cf4 (diff)
moved refresh mechanism to package auth
Diffstat (limited to 'util/authorize.go')
-rw-r--r--util/authorize.go2
1 files changed, 1 insertions, 1 deletions
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(),