Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
jairad26 committed Oct 10, 2024
1 parent da69464 commit 338c2e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/middleware/jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ func Init() {
}
}

var jwtParser = new(jwt.Parser)

func HandleJWT(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
var ctx context.Context = r.Context()
Expand All @@ -66,8 +68,6 @@ func HandleJWT(next http.Handler) http.Handler {
}
}

jwtParser := new(jwt.Parser)

if len(rsaPublicKeys) == 0 {
if !config.IsDevEnvironment() || tokenStr == "" {
next.ServeHTTP(w, r)
Expand Down

0 comments on commit 338c2e7

Please sign in to comment.