IDToken: Set typ header (#87430)

TokenSigning: Set typ header
This commit is contained in:
Karl Persson 2024-05-07 13:59:23 +02:00 committed by GitHub
parent bc67b88301
commit 37af1ae58e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -108,7 +108,7 @@ func (s *Service) SignIdentity(ctx context.Context, id identity.Requester) (stri
}
extracted := auth.IDClaims{}
// We don't need to verify the signature here, we are only intrested in checking
// We don't need to verify the signature here, we are only interested in checking
// when the token expires.
if err := parsed.UnsafeClaimsWithoutVerification(&extracted); err != nil {
s.metrics.failedTokenSigningCounter.Inc()

View File

@ -54,7 +54,10 @@ func (s *LocalSigner) getSigner(ctx context.Context) (jose.Signer, error) {
}
signer, err := jose.NewSigner(jose.SigningKey{Algorithm: jose.ES256, Key: key}, &jose.SignerOptions{
ExtraHeaders: map[jose.HeaderKey]any{headerKeyID: id},
ExtraHeaders: map[jose.HeaderKey]any{
headerKeyID: id,
jose.HeaderType: "jwt",
},
})
if err != nil {