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?
The JWK.thumbprint() function already returns a base64url-encoded hash (via b64e()).
JWTConnect-Python-CryptoJWT/src/cryptojwt/jwk/__init__.py
Line 270 in 2b735fe
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.
(
JWTConnect-Python-CryptoJWT/src/cryptojwt/jwk/__init__.py
Line 277 in 2b735fe
Is this something made on purpose?