humanitec / django-oauth-toolkit-jwt

django-oauth-toolkit extension that adds JWT support
MIT License
38 stars 26 forks source link

Added scope to JWT #13

Closed jdmwood closed 5 years ago

jdmwood commented 5 years ago

Hi there,

Great library - thanks for the effort!

This is just a small patch which made my life easier trying to integrate JWT with OAuth scopes.

Getting the scope into the JWT is extremely useful for handling permissions later.

In particular, it means that you can use the TokenHasScope permission from DOT.

jdmwood commented 5 years ago

Of course - good point!

I've added some tests which hopefully cover the new cases.

I haven't exactly tested JwtToken directly with a test, but I could sure add one as well if you like.

jdmwood commented 5 years ago

:+1: Cool thanks!