capless / warrant

Python library for using AWS Cognito. With support for SRP.
Apache License 2.0
469 stars 192 forks source link

COGNITO_JWKS #139

Open rednap opened 5 years ago

rednap commented 5 years ago

not in the documentation is how this ENV variable works, or even what it does...

maybe i'm missing something, kinda new to python, but how does one set the env var COGNITO_JWKS .. i assume this is used to validate the jwt sig as AWS describes here: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-verifying-a-jwt.html ??

your example: COGNITO_JWKS={"keys": [{"alg": "RS256","e": "AQAB","kid": "123456789ABCDEFGHIJKLMNOP","kty": "RSA","n": "123456789ABCDEFGHIJKLMNOP","use": "sig"},{"alg": "RS256","e": "AQAB","kid": "123456789ABCDEFGHIJKLMNOP","kty": "RSA","n": "123456789ABCDEFGHIJKLMNOP","use": "sig"}]}

i cannot $ export COGNITO_JWKS={} .. will $ export COGNITO_JWKS='{}' work?

any help would be greatly appreciated. thanks for the lib!