The JWK.thumbprint() function already returns a base64url-encoded hash (via b64e()).
|
return b64e(DIGEST_HASH[hash_function](_json)) |
However, when code later does:
self.kid = b64e(self.thumbprint("SHA-256")).decode("utf8")
it is applying b64e a second time on the thumbprint, which is already base64url-encoded.
(
|
self.kid = b64e(self.thumbprint("SHA-256")).decode("utf8") |
)
Is this something made on purpose?