Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle URL-safe base64 decoding for JWT (#38991)
* fix: handle URL-safe base64 decoding for JWT - Updated the JWT decoding logic to use URL-safe base64 decoding. - Added padding to the base64 encoded string to ensure proper decoding. - This fixes the issue where UTF-8 decoding errors occurred due to missing padding in the base64 string. Changes: - Replaced `base64.decodebytes` with `base64.urlsafe_b64decode`. - Added logic to calculate and append necessary padding to the base64 string. * More concise way as requested * Extend changes to aio decorators.py as requested * format by black * Update sdk/identity/azure-identity/azure/identity/_internal/decorators.py Co-authored-by: Paul Van Eck <paulvaneck@microsoft.com> * Update sdk/identity/azure-identity/azure/identity/aio/_internal/decorators.py Co-authored-by: Paul Van Eck <paulvaneck@microsoft.com> * Formatted code using Black as specified in ../../../eng/tox/tox.ini with the designated version --------- Co-authored-by: Paul Van Eck <paulvaneck@microsoft.com>
- Loading branch information