Skip to content

Commit

Permalink
use RawURLEncoding, it is the unpadded version
Browse files Browse the repository at this point in the history
  • Loading branch information
bensie committed Aug 31, 2024
1 parent e15f296 commit c573022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/issuer/kms.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func SignJWTWithKMS(ctx context.Context, kmsClient KMSAPI, token *jwt.Token, kms
fullSignature = append(fullSignature, esig.R.Bytes()...)
fullSignature = append(fullSignature, esig.S.Bytes()...)

sig := strings.TrimRight(base64.URLEncoding.EncodeToString(fullSignature), "=")
sig := base64.RawURLEncoding.EncodeToString(fullSignature)

return strings.Join([]string{sstr, sig}, "."), nil
}

0 comments on commit c573022

Please sign in to comment.