Commit Graph

28 Commits

Author SHA1 Message Date
Awais Qureshi
81bab4d01a Pyupgrade in common/djangoapps/third-party-auth/tests. 2021-03-19 15:39:48 +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
Talia
7100316f19 updating all the third_party_auth tests! 2020-09-30 16:35:36 -04:00
Tim McCormack
9cff06d762 Address 1+N django_site queries on login page by comparing keys directly (#23947)
Rather than fetching the Site for every provider in a loop, just look at
the ID of the site.

Added regression test, showing N `django_site` requests before and 0 after.
2020-05-11 15:37:22 +00:00
Robert Raposa
b98d200fdc Revert "Dark launch: Fix site shadowing and 1+N queries in third party auth config fetching (#23824)" (#23935)
This reverts commit 79420640d5.
2020-05-07 09:38:54 -04:00
Tim McCormack
79420640d5 Dark launch: Fix site shadowing and 1+N queries in third party auth config fetching (#23824)
This performs a dark launch compare of the existing implementation
(still in use) for fetching TPA provider configs and a new
implementation, recording metrics on exceptions and mismatches.

The new implementation should have two benefits, once we're switched
over:

- Fix 1+N queries on login page view where the site for each config
  was fetched in a loop (ARCHBOM-1139)
- Don't allow configs with the same key on different sites to
  interfere with each other (regression test added)

The new impl does not use TieredCache, but only the request cache,
which we may want to adjust later.
2020-05-06 13:54:32 +00: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
arbisoft
004d856316 Fixing python-modernize issues. 2019-07-11 14:04:05 +05:00
Thomas Tracy
29fb1588a9 Another pip issue. 2019-04-10 09:02:50 -04:00
Thomas Tracy
f59dc6c820 Fix's bug that does not allow an Oauth2 provider to have different slug and backend_names
Added comment to explain model change.

Removed accidental whitespace.

Another pip issue.
2019-04-09 19:59:55 -04:00
Brittney Exline
9a86a67ae0 ENT-943 Cleanup of old third_party_auth provider slug fields 2018-04-10 09:58:31 -04:00
Brittney Exline
682ec886ed ENT-943 Refactoring third_party_auth models 2018-04-05 15:19:58 -04:00
Douglas Hall
f0341e5d29 ENT-851 TPA Registry.get should return None if passed None. 2018-01-17 13:55:56 -05:00
Uman Shahzad
8b65ca17c5 Migrate to latest, split python-social-auth.
PSA was monolothic, now split, with new features, like
a DB-backed partial pipeline. FB OAuth2 version also upped.

Partial pipelines don't get cleared except when necessary.
They persist for special cases like change of browser while
still mid-pipeline (i.e. email validation step).

Refactor, cleanup, and update of a lot of small things as well.

PLEASE NOTE the new `social_auth_partial` table.
2017-06-20 22:05:36 +05:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Brandon DeRosier
d8e1b917ef ENT-320: Fix OAuth2ProviderConfig to be keyed by provider_slug
This change fixes a bug where OAuth2 Provider Configs only show
up on logistration if the provider's `provider_slug` matches a
valid OAuth2 backend name.

Closes ENT-320.
2017-04-18 09:21:04 -04:00
Matt Drayer
6e661404a4 mattdrayer/direct-idp-login: Allow tpa_hint to match hidden providers 2017-02-21 14:57:43 -05:00
Brandon DeRosier
3dcf689ee2 Implement Site settings for Third Party Auth providers 2016-09-26 12:43:00 -04:00
Jesse Shapiro
ce2ab5b15c Adding 'visible' field for SSO providers 2016-09-08 11:27:09 -04:00
Braden MacDonald
79a075328f Allow configuring sensitive third_party_auth settings via lms.auth.json 2015-08-25 16:35:35 -04:00
Ned Batchelder
f54fe787c6 Remove needless 'disable=no-member' pragmas 2015-08-03 17:47:44 -04:00
Braden MacDonald
b4904adc1e Use ConfigurationModels for third_party_auth, new metadata fetching - PR 8155 2015-06-26 13:23:59 -07:00
Braden MacDonald
caca3e1bdf SAML2 third_party_auth provider(s) - PR 8018 2015-06-26 13:23:59 -07:00
John Cox
ce0b640712 Add third-party auth implementation and tests 2014-04-25 12:11:20 -07:00
John Cox
8ecfa8679a Add common/djangoapps/third_party_auth; update pylintrc to allow test_* names.
third_party_auth contains a working settings mechanism, the start of the provider interface + 3 implementations (Google, Mozilla Persona, LinkedIn), and a stub for the auth pipeline. Modified existing lms settings files to use but deactivate the module.
2014-03-06 17:20:58 -08:00