Commits on Source (1)
-
Reiter, Christoph authored
This adds UserRolesInterface which is used for converting the oauth2 scopes to symfony roles. The default interface implementation converts them to "ROLE_SCOPE_FOO". The interface also gets passed the user ID and can fetch roles from other places as well, like LDAP, or ignore the scopes etc. Fixes #4
Showing
- src/API/UserRolesInterface.php 15 additions, 0 deletionssrc/API/UserRolesInterface.php
- src/Resources/config/services.yaml 7 additions, 0 deletionssrc/Resources/config/services.yaml
- src/Service/DefaultUserRoles.php 24 additions, 0 deletionssrc/Service/DefaultUserRoles.php
- src/Service/OIDCUserSession.php 19 additions, 17 deletionssrc/Service/OIDCUserSession.php
- tests/Authenticator/UserSessionTest.php 5 additions, 4 deletionstests/Authenticator/UserSessionTest.php
- tests/DefaultUserRolesTest.php 18 additions, 0 deletionstests/DefaultUserRolesTest.php
src/API/UserRolesInterface.php
0 → 100644
src/Service/DefaultUserRoles.php
0 → 100644
tests/DefaultUserRolesTest.php
0 → 100644