Skip to content

Commit

Permalink
优化对ws的支持
Browse files Browse the repository at this point in the history
  • Loading branch information
gowater committed Jul 5, 2023
1 parent 9367a9c commit 86080ec
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,8 @@ func ParseFromRequest(req *http.Request, publicKeyPath string) (uniqueUser, sign

return jwt.ParseRSAPublicKeyFromPEM(publicKey)
}, request.WithClaims(&jwt.RegisteredClaims{}))
if err != nil {
return "", "", err
}

if token.Valid {
if token != nil && token.Valid {
return parseToken(token)
}

Expand Down

0 comments on commit 86080ec

Please sign in to comment.