mirror of
https://forgejo.merr.is/annika/jwtauth.git
synced 2025-12-11 13:47:41 -05:00
Remove old comments
This commit is contained in:
parent
e701090bf8
commit
89031fb71d
1 changed files with 0 additions and 7 deletions
|
|
@ -127,24 +127,17 @@ func VerifyRequest(ja *JwtAuth, r *http.Request, paramAliases ...string) (*jwt.T
|
|||
case "token is expired":
|
||||
err = ErrExpired
|
||||
}
|
||||
|
||||
// ctx = NewContext(ctx, token, err)
|
||||
// next.ServeHTTP(w, r.WithContext(ctx))
|
||||
return token, err
|
||||
}
|
||||
|
||||
if token == nil || !token.Valid || token.Method != ja.signer {
|
||||
err = ErrUnauthorized
|
||||
// ctx = NewContext(ctx, token, err)
|
||||
// next.ServeHTTP(w, r.WithContext(ctx))
|
||||
return token, err
|
||||
}
|
||||
|
||||
// Check expiry via "exp" claim
|
||||
if IsExpired(token) {
|
||||
err = ErrExpired
|
||||
// ctx = NewContext(ctx, token, err)
|
||||
// next.ServeHTTP(w, r.WithContext(ctx))
|
||||
return token, err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue