Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JOSE] Issues with cognito decode and verify from AWS support tools #176

Open
Quamber opened this issue Aug 24, 2021 · 1 comment
Open

Comments

@Quamber
Copy link

Quamber commented Aug 24, 2021

Issues with a package in example:

https://github.com/awslabs/aws-support-tools/blob/master/Cognito/decode-verify-jwt/decode-verify-jwt.py

Traceback (most recent call last):

File "/Users/username/opt/anaconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3437, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)

File "", line 4, in
from jose import jwk, jwt

File "/Users/username/opt/anaconda3/lib/python3.8/site-packages/jose.py", line 546
print decrypt(deserialize_compact(jwt), {'k':key},
^
SyntaxError: invalid syntax

@ninjrok
Copy link

ninjrok commented Sep 9, 2021

Install python-jose in your workspace.

pip install python-jose

If you're using AWS lambda, upload the dependencies along with your zip file bundle.

https://docs.aws.amazon.com/lambda/latest/dg/python-package.html#python-package-create-package-with-dependency

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

No branches or pull requests

2 participants