latchset / jwcrypto

Implements JWK,JWS,JWE specifications using python-cryptography
GNU Lesser General Public License v3.0
439 stars 118 forks source link

Add support for 'scope' claim with multiple scopes #359

Closed tony2001 closed 4 months ago

tony2001 commented 4 months ago

Claim 'scope' is formally standardized by this RFC: https://datatracker.ietf.org/doc/html/rfc8693#name-scope-scopes-claim

It's been in use for quite a while though and it's a part of standard token provided by Keycloak, which is a long time industry standard for access management. Keycloak tokens may and quite often do contain multiple scopes, hence the need for this patch.

simo5 commented 4 months ago

Code looks good thanks! Please fix the style issues, you can test them locally using tox

tony2001 commented 4 months ago

I'm not really familiar with Python, but I think I've fixed the issues. Could check again pls?

simo5 commented 4 months ago

The failing test is codespell being stupid and flagging a function name in code you have not touched, I'll fix it later.

Thanks for the contribution, really appreciated!