BOM-1264: add third-party-auth scope and usage (#23135)
* WIP: add third-party-auth scope and usage BOM-1264 * Fix tests now that we do permissions in a more standard way. Rather than manually setting the permission class we previously explicitly raised a PermissionDenied exception. The way DRF permissoning logic works, if we use the WWW-Authenticate header in the highest priority auth class, it will return a 401 instead of a 403. * Added test to make sure having permissions gives access to user mapping api * Test new filters logic. Ensure that the filters we add to the application access model make it into the JWT correctly. * quality fix * quality fix * disable pylint warning * quality fix * fix indent prob Co-authored-by:Feanil Patel <feanil@edx.org> Co-authored-by:
Manjinder Singh <49171515+jinder1s@users.noreply.github.com>
Showing
- common/djangoapps/third_party_auth/api/permissions.py 67 additions, 9 deletionscommon/djangoapps/third_party_auth/api/permissions.py
- common/djangoapps/third_party_auth/api/tests/test_permissions.py 177 additions, 13 deletions...djangoapps/third_party_auth/api/tests/test_permissions.py
- common/djangoapps/third_party_auth/api/tests/test_views.py 20 additions, 4 deletionscommon/djangoapps/third_party_auth/api/tests/test_views.py
- common/djangoapps/third_party_auth/api/views.py 4 additions, 11 deletionscommon/djangoapps/third_party_auth/api/views.py
- common/djangoapps/third_party_auth/tests/testutil.py 2 additions, 2 deletionscommon/djangoapps/third_party_auth/tests/testutil.py
- lms/envs/common.py 3 additions, 2 deletionslms/envs/common.py
- openedx/core/djangoapps/oauth_dispatch/adapters/dot.py 25 additions, 4 deletionsopenedx/core/djangoapps/oauth_dispatch/adapters/dot.py
- openedx/core/djangoapps/oauth_dispatch/admin.py 1 addition, 1 deletionopenedx/core/djangoapps/oauth_dispatch/admin.py
- openedx/core/djangoapps/oauth_dispatch/docs/decisions/0011-scope-filter-support.rst 53 additions, 0 deletions...uth_dispatch/docs/decisions/0011-scope-filter-support.rst
- openedx/core/djangoapps/oauth_dispatch/docs/decisions/0012-scope-and-filter-for-third-party-auth.rst 46 additions, 0 deletions.../decisions/0012-scope-and-filter-for-third-party-auth.rst
- openedx/core/djangoapps/oauth_dispatch/docs/how_tos/testing_manually.rst 4 additions, 0 deletions...angoapps/oauth_dispatch/docs/how_tos/testing_manually.rst
- openedx/core/djangoapps/oauth_dispatch/migrations/0008_applicationaccess_filters.py 21 additions, 0 deletions...uth_dispatch/migrations/0008_applicationaccess_filters.py
- openedx/core/djangoapps/oauth_dispatch/models.py 20 additions, 1 deletionopenedx/core/djangoapps/oauth_dispatch/models.py
- openedx/core/djangoapps/oauth_dispatch/tests/test_views.py 3 additions, 0 deletionsopenedx/core/djangoapps/oauth_dispatch/tests/test_views.py
- openedx/core/lib/api/permissions.py 5 additions, 0 deletionsopenedx/core/lib/api/permissions.py
Loading
Please register or sign in to comment