mirror of
https://forgejo.merr.is/annika/jwtauth.git
synced 2025-12-11 13:47:41 -05:00
fix compatibility with jwx 1.1.0 (#55)
This commit is contained in:
parent
38df5c8c2e
commit
52c0aa2d7c
3 changed files with 39 additions and 21 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package jwtauth
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"net/http"
|
||||
|
|
@ -139,7 +138,7 @@ func (ja *JWTAuth) sign(token jwt.Token) ([]byte, error) {
|
|||
}
|
||||
|
||||
func (ja *JWTAuth) parse(payload []byte) (jwt.Token, error) {
|
||||
return jwt.Parse(bytes.NewReader(payload), ja.verifier)
|
||||
return jwt.Parse(payload, ja.verifier)
|
||||
}
|
||||
|
||||
// ErrorReason will normalize the error message from the underlining
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue