diff --git a/internal/jwtutil/jwtutil.go b/internal/jwtutil/jwtutil.go index 1a323f2..aa7f652 100644 --- a/internal/jwtutil/jwtutil.go +++ b/internal/jwtutil/jwtutil.go @@ -9,6 +9,8 @@ import ( "github.com/golang-jwt/jwt/v5" ) +var ErrUnexpectedSigningMethod = errors.New("unexpected signing method") + type JWTTokenizer interface { // AccessToken generates a new access token with the given payload AccessToken(pl Payload) (string, error) @@ -54,8 +56,6 @@ func (j *JWTUtil) RefreshToken() (string, error) { return hex.EncodeToString(b), nil } -var ErrUnexpectedSigningMethod = errors.New("unexpected signing method") - func (j *JWTUtil) Parse(token string) (Payload, error) { var claims jwt.RegisteredClaims _, err := jwt.ParseWithClaims(token, &claims, func(t *jwt.Token) (interface{}, error) {