Skip to content

Commit

Permalink
Merge pull request openedx#35 from andela-kerinoso/python-social-auth…
Browse files Browse the repository at this point in the history
…/redirect-scheme-setting

* python-social-auth/redirect-scheme-setting:
  add missing import and move setting prop outside of FEATURES
  [#118695049] Replace upstream python-social-auth with fork version
  [#118695049] Use redirection scheme set in lms.env.json
  • Loading branch information
lgfa29 committed May 17, 2016
2 parents b4fa194 + 328e4af commit 57c25e5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions common/djangoapps/third_party_auth/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
b) calls apply_settings(), passing in the Django settings
"""

from django.conf import settings

_FIELDS_STORED_IN_SESSION = ['auth_entry', 'next']
_MIDDLEWARE_CLASSES = (
'third_party_auth.middleware.ExceptionMiddleware',
Expand Down Expand Up @@ -84,3 +86,6 @@ def apply_settings(django_settings):
'social.apps.django_app.context_processors.backends',
'social.apps.django_app.context_processors.login_redirect',
)

# Set scheme to use for redirection in python-social-auth
django_settings.REDIRECT_IS_HTTPS = getattr(settings, 'THIRD_PARTY_AUTH_REDIRECT_IS_HTTPS', False)
3 changes: 3 additions & 0 deletions lms/envs/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,9 @@
##### X-Frame-Options response header settings #####
X_FRAME_OPTIONS = ENV_TOKENS.get('X_FRAME_OPTIONS', X_FRAME_OPTIONS)

##### Set HTTPS for third-party auth redirect #####
THIRD_PARTY_AUTH_REDIRECT_IS_HTTPS = ENV_TOKENS.get('THIRD_PARTY_AUTH_REDIRECT_IS_HTTPS', False)

##### Third-party auth options ################################################
if FEATURES.get('ENABLE_THIRD_PARTY_AUTH'):
AUTHENTICATION_BACKENDS = (
Expand Down
3 changes: 2 additions & 1 deletion requirements/edx/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ python-dateutil==2.1

# This module gets monkey-patched in third_party_auth.py to fix a Django 1.8 incompatibility.
# When this dependency gets upgraded, the monkey patch should be removed, if possible.
python-social-auth==0.2.12
# python-social-auth==0.2.12
-e git+https://github.com/bigdatauniversity/python-social-auth.git#egg=python-social-auth

pytz==2015.2
pysrt==0.4.7
Expand Down

0 comments on commit 57c25e5

Please sign in to comment.