Skip to content

Commit ba45165

Browse files
authored
Merge pull request #543 from Kuadrant/jwt/v5
dep: upgrade to jwt/v5
2 parents c0c0654 + 407e98b commit ba45165

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/go-jose/go-jose/v4 v4.0.5
1313
github.com/go-logr/logr v1.4.2
1414
github.com/gogo/googleapis v1.4.0
15-
github.com/golang-jwt/jwt v3.2.2+incompatible
15+
github.com/golang-jwt/jwt/v5 v5.2.2
1616
github.com/google/cel-go v0.21.0
1717
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
1818
github.com/hashicorp/go-multierror v1.1.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5
196196
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
197197
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
198198
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
199-
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
200-
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
199+
github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8=
200+
github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
201201
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
202202
github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=
203203
github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=

pkg/evaluators/response/wristband.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/kuadrant/authorino/pkg/json"
1414

1515
jose "github.com/go-jose/go-jose/v4"
16-
"github.com/golang-jwt/jwt"
16+
"github.com/golang-jwt/jwt/v5"
1717
)
1818

1919
const DEFAULT_WRISTBAND_DURATION = int64(300)
@@ -53,12 +53,6 @@ func NewSigningKey(name string, algorithm string, singingKey []byte) (*jose.JSON
5353
return signingKey, nil
5454
}
5555

56-
type Claims map[string]interface{}
57-
58-
func (c *Claims) Valid() error {
59-
return nil
60-
}
61-
6256
func NewWristbandConfig(issuer string, claims []json.JSONProperty, tokenDuration *int64, signingKeys []jose.JSONWebKey) (*Wristband, error) {
6357
// token duration
6458
var duration int64
@@ -115,7 +109,7 @@ func (w *Wristband) Call(pipeline auth.AuthPipeline, ctx context.Context) (inter
115109
exp := iat + int64(w.TokenDuration)
116110

117111
// claims
118-
claims := Claims{
112+
claims := jwt.MapClaims{
119113
"iss": w.GetIssuer(),
120114
"iat": iat,
121115
"exp": exp,

0 commit comments

Comments
 (0)