From 047e867faa4d7bcc5d3493f6c2d1c33e4e1be587 Mon Sep 17 00:00:00 2001 From: Lakhan Samani Date: Sun, 9 Jan 2022 17:40:08 +0530 Subject: [PATCH] Add admin session only via http cookies --- server/utils/auth_token.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/server/utils/auth_token.go b/server/utils/auth_token.go index fa6a150..6003291 100644 --- a/server/utils/auth_token.go +++ b/server/utils/auth_token.go @@ -133,13 +133,6 @@ func CreateAdminAuthToken(tokenType enum.TokenType, c *gin.Context) (string, err func GetAdminAuthToken(gc *gin.Context) (string, error) { token, err := GetAdminCookie(gc) if err != nil || token == "" { - // try to check in auth header for cookie - // auth := gc.Request.Header.Get("Authorization") - // if auth == "" { - // return "", fmt.Errorf(`unauthorized`) - // } - - // token = strings.TrimPrefix(auth, "Bearer ") return "", fmt.Errorf("unauthorized") }