Skip to content

Fix small mistake on HMAC jwk example#339

Merged
asherf merged 1 commit intompdavis:masterfrom
leandropls:patch-1
May 28, 2025
Merged

Fix small mistake on HMAC jwk example#339
asherf merged 1 commit intompdavis:masterfrom
leandropls:patch-1

Conversation

@leandropls
Copy link
Contributor

>>> decoded_sig = base64url_decode(encoded_sig)
Traceback (most recent call last):
(...)
  File "(...)/python3.11/site-packages/jose/utils.py", line 76, in base64url_decode
    input += b"=" * (4 - rem)
TypeError: can only concatenate str (not "bytes") to str
>>> decoded_sig = base64url_decode(encoded_sig.encode())
>>>

```python
>>> decoded_sig = base64url_decode(encoded_sig)
Traceback (most recent call last):
(...)
  File "(...)/python3.11/site-packages/jose/utils.py", line 76, in base64url_decode
    input += b"=" * (4 - rem)
TypeError: can only concatenate str (not "bytes") to str
>>> decoded_sig = base64url_decode(encoded_sig.encode())
>>>
```
@merdzhanov-cf
Copy link

Please fix this...
so many simple issues with this library

@asherf asherf closed this May 28, 2025
@asherf asherf reopened this May 28, 2025
@asherf asherf merged commit 0b4af73 into mpdavis:master May 28, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants