From a91db35af6ed8c5c38c2de05a2def392efce2985 Mon Sep 17 00:00:00 2001 From: Mitar Date: Thu, 7 Mar 2024 13:22:07 +0100 Subject: [PATCH] fix: pass JWK for singing so that KeyID is set in JWTs --- token/jwt/jwt.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/token/jwt/jwt.go b/token/jwt/jwt.go index d9f825a7..dc7f96e1 100644 --- a/token/jwt/jwt.go +++ b/token/jwt/jwt.go @@ -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: