jetbridge / flask_cognito

Flask authentication with JWT against AWS Cognito
MIT License
94 stars 30 forks source link

Cognito groups #9

Closed cdominguezg closed 4 years ago

cdominguezg commented 4 years ago

Here is a pull request to extend the possibilities of this library. I want to use it in a project and I need to check the group of the user authenticated with Cognito.

I've done a decorator and a function, which receives a list of strings with the names of the groups to check if the user belongs to at least one of these groups.

Regards :)

cdominguezg commented 4 years ago

Now you have an example of how to use my feature inside Readme.md file :)

Review it if you can and it would be nice if all is ok, to update pypi package!

Thanks for develop this library, you saved me, literally :+1:

revmischa commented 4 years ago

Done, thanks for the contribution!