BASE_URL is now taken from lms.yml
This commit is contained in:
parent
0d52c5902c
commit
a3bb22422a
@ -4,10 +4,6 @@ written by: Lawrence McDaniel
|
||||
|
||||
date: oct-2022
|
||||
|
||||
usage: subclass of BaseOAuth2 Third Party Authtencation client to
|
||||
handle the field mapping and data conversions between
|
||||
the dict that WP Oauth returns versus the dict that Open edX
|
||||
actually needs.
|
||||
"""
|
||||
import json
|
||||
from urllib.parse import urlencode
|
||||
@ -16,12 +12,12 @@ from urllib.parse import urljoin
|
||||
from logging import getLogger
|
||||
from social_core.backends.oauth import BaseOAuth2
|
||||
from django.contrib.auth import get_user_model
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
User = get_user_model()
|
||||
logger = getLogger(__name__)
|
||||
|
||||
VERBOSE_LOGGING = True
|
||||
VERBOSE_LOGGING = False
|
||||
|
||||
|
||||
class WPOpenEdxOAuth2(BaseOAuth2):
|
||||
@ -50,11 +46,12 @@ class WPOpenEdxOAuth2(BaseOAuth2):
|
||||
# Third Party Authentication / Provider Configuration (OAuth)
|
||||
# setup page drop-down box titled, "Backend name:", just above
|
||||
# the "Client ID:" and "Client Secret:" fields.
|
||||
|
||||
name = "wp-oauth"
|
||||
|
||||
# note: no slash at the end of the base url. Python Social Auth
|
||||
# might clean this up for you, but i'm not 100% certain of that.
|
||||
BASE_URL = "https://set-me-please.com"
|
||||
BASE_URL = settings.FEATURES.get('WP_PROVIDER_URL')
|
||||
|
||||
# a path to append to the BASE_URL: https://oauth_host.com/oauth/
|
||||
PATH = "oauth/"
|
||||
|
Loading…
Reference in New Issue
Block a user