Skip to content

Commit

Permalink
fix: pass JWK for singing so that KeyID is set in JWTs
Browse files Browse the repository at this point in the history
  • Loading branch information
mitar committed Mar 7, 2024
1 parent 1f27af4 commit a91db35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions token/jwt/jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ func (j *DefaultSigner) Generate(ctx context.Context, claims MapClaims, header M

switch t := key.(type) {
case *jose.JSONWebKey:
return generateToken(claims, header, jose.SignatureAlgorithm(t.Algorithm), t.Key)
return generateToken(claims, header, jose.SignatureAlgorithm(t.Algorithm), t)
case jose.JSONWebKey:
return generateToken(claims, header, jose.SignatureAlgorithm(t.Algorithm), t.Key)
return generateToken(claims, header, jose.SignatureAlgorithm(t.Algorithm), t)
case *rsa.PrivateKey:
return generateToken(claims, header, jose.RS256, t)
case *ecdsa.PrivateKey:
Expand Down

0 comments on commit a91db35

Please sign in to comment.