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

Add several different public keys for one Tokenvalidator, or allow several Validators for one auth_type in ResourceProtector #606

Open
danilovmy opened this issue Dec 20, 2023 · 0 comments

Comments

@danilovmy
Copy link

We use AWS Cognito for token generation. Following this, we implement ResourceProtector in various Python sources.

To verify a token, AWS provides documentation at:
https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-verifying-a-jwt.html
AWS Cognito offers several public keys to decode a token. Among them, the key declared in the header should be used.

However, I can only define a TokenValidator with a single public key. ResourceProtector consumes only one TokenValidator for one auth_type. In the case of Cognito, I would need to hard override all classes because everything is hardcoded.

I ask to add possibility to work with couple of public keys for tocken.decode.

p.s. Translated with Chat GPT. If my ask is not clear - i can add information.

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

1 participant