Skip to content

Commit

Permalink
fix: Update auth middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
sirateek committed Apr 23, 2023
1 parent 615404d commit 40a6952
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions httpserver/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ func AuthModelMapping() gin.HandlerFunc {

logrus.Info("Token Str: ", tokenStr)

token, err := jwt.Parse(tokenStr, nil)
if token == nil || err != nil {
token, _ := jwt.Parse(tokenStr, nil)
if token == nil {
logrus.Warn("Can't parse jwt")
c.AbortWithStatus(http.StatusForbidden)
return
Expand Down

0 comments on commit 40a6952

Please sign in to comment.