Closed saintsGrad15 closed 2 years ago
Yes, the authenticator doesn't try to validate JWTs on the client side as it treats them as opaque values. We simply make sure there is a value present. We rely on the server to ultimately verify that the access token is valid.
I was looking for SDK logic that will validate a bearer token's signature. I found this method and when testing it, it didn't fail when I deliberately changed the signature to nonsense.
When I looked at the code I saw this method doesn't endeavor to do that at all.
Forgive me if I'm missing the intention but is a None-check really all this method is intended to do? If so, may I suggest clarifying that in the docstring?
https://github.com/IBM/python-sdk-core/blob/20cc41f58d8d449fcc679285795dd49b6464be79/ibm_cloud_sdk_core/authenticators/bearer_token_authenticator.py#L45-L56