Commit Graph

63 Commits

Author SHA1 Message Date
Sameen Fatima
8ca34141a6 feat: look up remote_id by remote_id_field_name (#37228) 2025-11-13 09:20:26 +05:00
wgu-jesse-stewart
254dd2f689 Fix: CORS issues in third-party auth disconnect by adding JSON endpoint (#37100)
Add a json auth endpoint where previously there was only an HTML redirect version. This will make it easier to work with MFEs.

---------

Co-authored-by: Feanil Patel <feanil@axim.org>
2025-09-15 10:07:49 -04:00
Kaustav Banerjee
aca3ba4fda test: add test for unprivileged user 2025-05-29 16:23:10 +05:30
Kaustav Banerjee
02344c5905 feat: API to delete given social auth record for user 2025-05-29 16:23:10 +05:30
Deborah Kaplan
29de9b2dc4 feat!: Legacy account, profile, order history removal (#36219)
* feat!: Legacy account, profile, order history removal

This removes the legacy account and profile applications, and the order
history page. This is primarily a reapplication of #31893, which was
rolled back due to prior blockers.

FIXES: APER-3884
FIXES: openedx/public-engineering#71


Co-authored-by: Muhammad Abdullah Waheed <42172960+abdullahwaheed@users.noreply.github.com>
Co-authored-by: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com>
2025-02-10 14:39:13 -05:00
Usama Sadiq
1a16073ad0 fix: enable pylint warnings (#36196) 2025-02-03 14:18:11 +05:00
salmannawaz
57b480b04f Update all edx-platform REST endpoints to support JWT Auth (#34152)
* chore: update API endpoints to support default JWT auth

The default DRF Auth classes were recently updated to allow for both JWT and Session auth by default. Any endpoint that overrides the AUTHENTICATION_CLASSES but has just session, just JWT or just both of those should be updated to remove the override.

Details in https://github.com/openedx/edx-platform/issues/33662
2024-02-13 10:46:58 -05:00
Muhammad Abdullah Waheed
caf8e456e2 Revert "feat: Account and profile MFE legacy removal - redeployment (#31893)" (#33542)
This reverts commit 08f5e7e563.
2023-10-19 12:26:29 +05:00
Muhammad Abdullah Waheed
08f5e7e563 feat: Account and profile MFE legacy removal - redeployment (#31893)
feat: Account and profile MFE legacy removal - redeployment

* Revert "Revert "FC-0001: Account pages -> micro-frontend (#30336)" (#31888)"

This reverts commit 90c4ca6e47.

* refactor: removed filters test from user_api accounts

---------

Co-authored-by: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com>
2023-10-19 10:43:15 +05:00
Muhammad Abdullah Waheed
90c4ca6e47 Revert "FC-0001: Account pages -> micro-frontend (#30336)" (#31888)
This reverts commit 0f02c7b3d9.
2023-03-07 17:41:56 -05:00
Sagirov Evgeniy
0f02c7b3d9 FC-0001: Account pages -> micro-frontend (#30336)
* feat: Account pages. Learner Profile page

* feat: Account pages. Account Settings page

* feat: Account pages. Removed unused styles

* feat: Account pages. Removed unused toggles

* feat: fixed tests and pylint errors

* feat: update redirect to account settings for student_dashboard

* feat: fix pylint errors
2023-03-07 17:41:52 +05:00
Ned Batchelder
12765a7a59 refactor(test): use @skip_unless_lms uniformly 2023-02-01 13:52:26 -08:00
Alexander Sheehan
fd6b726a68 fix: accounting for non-unique entity ID on idp configs + fixing provider data bulk update bug 2022-06-22 11:02:08 -04:00
Jawayria
7f5b4a6a47 chore: removed 'wrong-import-order' from disabled imports (#29365)
* chore: removed 'wrong-import-order' from disabled imports
2022-01-06 19:14:51 +05:00
Jawayria
bd5e00b725 fix: fixed RemovedInDjango40 warnings in common 2021-12-14 19:55:01 +05:00
Kshitij Sobti
9e787a09bc chore: remove dependency on rest_condition (#28663)
rest-condition has not been updated for a while, and with DRF 3.9 it is no longer needed since the ability to combine Permission classes using boolean operators is now provided by DRF directly.
2021-10-04 15:38:17 -04:00
Usama Sadiq
484cd536e2 fix: Fixed new pylint warnings (#28724) 2021-09-23 17:54:04 +05:00
Awais Qureshi
a2f5a46a68 refactor: Pyupgrade in common/djangoapps/third-party-auth/tests. 2021-03-19 12:40:15 +05:00
Jawayria
98edaf887a Merge pull request #26500 from edx/jawayria/bom-2351-3
BOM-2351: Removed unused imports from common/djangoapps/third_party_auth
2021-02-23 16:08:57 +05:00
usamasadiq
96f0915b0f Fixed new pylint warnings.
use generator in any/all()
disable not-callable warnings
disable no-member warnings
Suppressed smaller pylint warnings
Pin edx-proctoring==3.5.0
2021-02-22 16:36:53 +05:00
Jawayria
310da0d6a7 BOM-2351: Removed unused imports from common/djangoapps/third_party_auth 2021-02-22 14:05:40 +05:00
Aarif
e6a0d35009 replaced unittest assertions pytest assertions (#26240) 2021-02-12 12:31:37 +05:00
Jawayria
7be5a683aa Applied pylint-amnesty to third_party_auth 2021-02-03 13:37:05 +05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Tim McCormack
f29e418264 Revert "Revert "ARCHBOM-1494: Refer to custom attributes, not metrics, especially with edx-django-utils (#25010)" (#25025)" (#25055)
This reverts commit 986a448d9e.
2020-09-28 13:53:57 +00:00
Ahtisham Shahid
986a448d9e Revert "ARCHBOM-1494: Refer to custom attributes, not metrics, especially with edx-django-utils (#25010)" (#25025)
This reverts commit ba9ee4e151.

Fixed Style lint issue
2020-09-21 13:48:00 +05:00
Tim McCormack
ba9ee4e151 ARCHBOM-1494: Refer to custom attributes, not metrics, especially with edx-django-utils (#25010)
This uses the new names introduced in edx-django-utils
3.8.0 (edx/edx-django-utils#59), which we're already using, as
well as updating a few other locations where we incorrectly refer
to New Relic custom metrics instead of custom attributes.

Includes a couple of unrelated lint fixes in a file I modified.
2020-09-18 13:33:50 +00:00
Ned Batchelder
cca33732ba Correct markup mistakes in api docs 2020-05-12 13:36:14 -04:00
Zia Fazal
9a9683fc21 Merge pull request #23659 from edx/ziafazal/ENT-2759
Added global staff permission to third party auth users API
2020-04-09 09:56:16 +05:00
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +05:00
zia.fazal@arbisoft.com
b37a986656 Added global staff permission to third party auth users API 2020-04-08 14:53:32 +05:00
Matt Hughes
acce8baca4 Add management command for retroactively adding sso IdV for IdP
We sometimes update preexisting SAML SSO providers to configure them
to automatically create SSO identity verification (IdV) records when a
learner links an account via that provider. Turning that configuration
from off to on does make it such that when learners log back in via
their linked account, a new IdV record will be created for them. But
it's possible we'd want this process to happen more automatically and
seamlessly, for which this management command will be helpful.

Note that this does not help with removing SSO verification records
for a provider for which this configuration has been turned off.

JIRA:EDUCATOR-4947
2020-03-17 16:04:24 -04:00
Manjinder Singh
9725303c4a Removing patch from test (#23250)
the patched toggle was removed from edx-drf-extensions recently
2020-03-02 11:02:25 -05:00
Feanil Patel
5ec487452d Merge pull request #23188 from edx/robrap/BOM-1324-add-constraint
BOM-1324: remove oauth2.enforce_jwt_scopes toggle
2020-03-02 09:55:35 -05:00
Manjinder Singh
953b0e728b Remove ThirdPartyAuthProviderApiPermission (#23195)
* Remove ThirdPartyAuthProviderApiPermission

Also removed ProviderApiPermissions and ApiPermissionsAdminForm and removal of DOP for third_party_auth

* Removing model

* Replaced long_token with default_token_generator

* Adding skip to test_migrations_are_in_sync
2020-02-27 15:42:09 -05:00
Robert Raposa
a4716c75cb fix tests 2020-02-27 08:58:45 -05:00
Robert Raposa
84686e81c3 BOM-1324: remove oauth2.enforce_jwt_scopes toggle
The oauth2.enforce_jwt_scopes waffle switch was added temporarily for
the rollout of jwt scopes. This removes the toggle and replacing code
with the equivalent of `oauth2.enforce_jwt_scopes` as True.
2020-02-27 08:58:45 -05:00
Robert Raposa
372d2e927c 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>
2020-02-21 11:25:28 -05:00
Manjinder Singh
d7bd80a100 Renamed OAuth2Authentication to BearerAuthentication (#23128)
* Renamed OAuth2Authentication to BearerAuthentication
* Added back OAuth2Authentication name
-there are libraries such as edx-enterprise that still import OAuth2Authentication.  The OAuth2Authentication class should be fully removed when everything is importing BearerAuthentication correctly
2020-02-18 13:29:29 -05:00
Manjinder Singh
cce8cdd661 Replacing OAuth2Auth (#23067)
- Removing deprecated auth classes
- Replacing OAuth2AuthenticationAllowInactiveUserDeprecated with OAuth2AuthenticationAllowInactiveUser
- the old class was a child class of a deprecated class that we are removing and replacing.
2020-02-11 10:38:13 -05:00
Manjinder Singh
cea795b02e Added new auth class (#23018)
* Added new auth class

- Created new class called OAuth2AuthenticationAllowInactiveUser, which replaces old class with same name
- Renames previous  OAuth2AuthenticationAllowInactiveUser to  OAuth2AuthenticationAllowInactiveUserDeprecated
- Replaced all imports of  OAuth2AuthenticationAllowInactiveUser to call deprecated class instead
- testing new class in discussion(added flag based on django setting)
2020-02-06 10:37:27 -05:00
Robert Raposa
28206e4c45 add jwt auth to third-party auth endpoint
BOM-897
2020-02-04 10:02:04 -05:00
Manjinder Singh
eb694528e7 Adding metrics to oauth2authentication class (#22970)
Currently, we are working on removing the rest_framework_auth library from edx-platform. For this push, we need to remove the oauth2Authentication class. This PR creates a new class oauth2AuthenticationDeprecated that adds additional new relic metrics. The metrics would allow us to see how often this class is used and its success rate. The hope is that this information will help us with transitioning to a different authentication class.
2020-01-30 09:13:51 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Ayub khan
8a95a8e520 BOM-95
assertItemsEqual with six.assertCountEqual
2019-08-21 17:01:40 +05:00
arbisoft
e87dc6cc77 Fixing python-modernize issues. 2019-07-11 14:24:38 +05:00
Douglas Hall
7128059921 Add API view for retrieving third party auth user status. 2019-04-02 12:58:13 -04:00
Matthew Piatetsky
9681ca36b8 fix unicode strings in common/ 2019-02-05 10:57:00 -05:00
J. Cliff Dyer
b3521e0f88 Add endpoint to get SAML providers for a user.
View is combined with user SSO views.

Includes a new version of the view that takes explicit "username" or "email".

OC-4285
2018-10-18 14:02:12 -04:00