Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normalize dashes in JWT permissions/scopes (#184)
### Changes When converting permissions/scopes to Symfony roles, apply replacement not only for colon (`:`) character, but also for dash (`-`) character, as some resources/permissions consist of multiple words and dash is a recommended separator in such cases. ### Testing - Have a permission/scope in Auth0 token that contains a dash (e.g. `read:licence-plates`) - Convert it to Symfony roles (by getting the roles of the JWT authenticated user/m2m): - before: it would return `ROLE_READ_LICENCE-PLATES` - after: it returns `ROLE_READ_LICENCE_PLATES` [ ] This change adds test coverage [ ] This change has been tested on the latest version of Symfony ### Checklist [x] I have read the [Auth0 general contribution guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md) [x] I have read the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md) [x] All existing and new tests complete without errors Co-authored-by: Evan Sims <[email protected]>
- Loading branch information