Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
course-discovery
Commits
82fc1b5d
Commit
82fc1b5d
authored
Jun 17, 2016
by
Clinton Blackburn
Committed by
GitHub
Jun 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for single sign-out (#133)
ECOM-2345
parent
b2f05bab
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
19 deletions
+8
-19
course_discovery/apps/core/views.py
+2
-2
course_discovery/settings/base.py
+1
-4
course_discovery/urls.py
+4
-12
requirements/base.txt
+1
-1
No files found.
course_discovery/apps/core/views.py
View file @
82fc1b5d
...
...
@@ -2,11 +2,11 @@
import
logging
import
uuid
from
django.db
import
transaction
,
connection
,
DatabaseError
from
django.http
import
JsonResponse
from
django.conf
import
settings
from
django.contrib.auth
import
get_user_model
,
login
,
authenticate
from
django.db
import
transaction
,
connection
,
DatabaseError
from
django.http
import
Http404
from
django.http
import
JsonResponse
from
django.shortcuts
import
redirect
from
django.views.generic
import
View
...
...
course_discovery/settings/base.py
View file @
82fc1b5d
...
...
@@ -184,6 +184,7 @@ AUTO_AUTH_USERNAME_PREFIX = 'auto_auth_'
SOCIAL_AUTH_EDX_OIDC_KEY
=
'replace-me'
SOCIAL_AUTH_EDX_OIDC_SECRET
=
'replace-me'
SOCIAL_AUTH_EDX_OIDC_URL_ROOT
=
'replace-me'
SOCIAL_AUTH_EDX_OIDC_LOGOUT_URL
=
'replace-me'
SOCIAL_AUTH_EDX_OIDC_ID_TOKEN_DECRYPTION_KEY
=
SOCIAL_AUTH_EDX_OIDC_SECRET
# Request the user's permissions in the ID token
...
...
@@ -328,7 +329,3 @@ ECOMMERCE_API_URL = 'http://127.0.0.1:8002/api/v2/'
ORGANIZATIONS_API_URL
=
'http://127.0.0.1:8000/api/organizations/v0/'
MARKETING_API_URL
=
'http://example.org/api/catalog/v2/'
MARKETING_URL_ROOT
=
'http://example.org/'
EDX_DRF_EXTENSIONS
=
{
'OAUTH2_USER_INFO_URL'
:
'http://localhost:8000/oauth2/user_info'
,
}
course_discovery/urls.py
View file @
82fc1b5d
...
...
@@ -15,32 +15,24 @@ Including another URLconf
import
os
from
auth_backends.urls
import
auth_urlpatterns
from
django.conf
import
settings
from
django.conf.urls
import
include
,
url
from
django.contrib
import
admin
from
django.contrib.auth.views
import
logout
from
django.core.urlresolvers
import
reverse_lazy
from
django.views.generic
import
RedirectView
from
course_discovery.apps.core
import
views
as
core_views
from
course_discovery.apps.course_metadata.views
import
QueryPreviewView
admin
.
autodiscover
()
# pylint: disable=invalid-name
# Always login via edX OpenID Connect
login
=
RedirectView
.
as_view
(
url
=
reverse_lazy
(
'social:begin'
,
args
=
[
'edx-oidc'
]),
permanent
=
False
,
query_string
=
True
)
urlpatterns
=
[
urlpatterns
=
auth_urlpatterns
+
[
url
(
r'^admin/'
,
include
(
admin
.
site
.
urls
)),
url
(
r'^api/'
,
include
(
'course_discovery.apps.api.urls'
,
namespace
=
'api'
)),
url
(
r'^api-auth/'
,
include
(
'rest_framework.urls'
,
namespace
=
'rest_framework'
)),
# Use the same auth views for all logins, including those originating from the browseable API.
url
(
r'^api-auth/'
,
include
(
auth_urlpatterns
,
namespace
=
'rest_framework'
)),
url
(
r'^api-docs/'
,
include
(
'rest_framework_swagger.urls'
)),
url
(
r'^auto_auth/$'
,
core_views
.
AutoAuth
.
as_view
(),
name
=
'auto_auth'
),
url
(
r'^health/$'
,
core_views
.
health
,
name
=
'health'
),
url
(
r'^login/$'
,
login
,
name
=
'login'
),
url
(
r'^logout/$'
,
logout
,
name
=
'logout'
),
url
(
''
,
include
(
'social.apps.django_app.urls'
,
namespace
=
'social'
)),
url
(
'^$'
,
QueryPreviewView
.
as_view
()),
]
...
...
requirements/base.txt
View file @
82fc1b5d
...
...
@@ -12,7 +12,7 @@ djangorestframework-jwt==1.8.0
djangorestframework-xml==1.3.0
django-rest-swagger[reST]==0.3.7
dry-rest-permissions==0.1.6
edx-auth-backends==0.
3.1
edx-auth-backends==0.
5.0
edx-ccx-keys==0.2.0
edx-drf-extensions==0.5.1
edx-opaque-keys==0.3.1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment