Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx-platform
Commits
b77bff4d
Commit
b77bff4d
authored
Nov 20, 2017
by
Sven Marnach
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small fixes to support Okta SSO.
parent
3d087d5c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
common/djangoapps/third_party_auth/pipeline.py
+6
-5
common/djangoapps/third_party_auth/tests/specs/base.py
+3
-4
lms/static/js/student_account/views/RegisterView.js
+1
-1
No files found.
common/djangoapps/third_party_auth/pipeline.py
View file @
b77bff4d
...
...
@@ -150,7 +150,7 @@ logger = getLogger(__name__)
class
AuthEntryError
(
AuthException
):
"""Raised when auth_entry is
missing or
invalid on URLs.
"""Raised when auth_entry is invalid on URLs.
auth_entry tells us whether the auth flow was initiated to register a new
user (in which case it has the value of AUTH_ENTRY_REGISTER) or log in an
...
...
@@ -459,10 +459,11 @@ def running(request):
def
parse_query_params
(
strategy
,
response
,
*
args
,
**
kwargs
):
"""Reads whitelisted query params, transforms them into pipeline args."""
auth_entry
=
strategy
.
request
.
session
.
get
(
AUTH_ENTRY_KEY
)
if
not
(
auth_entry
and
auth_entry
in
_AUTH_ENTRY_CHOICES
):
raise
AuthEntryError
(
strategy
.
request
.
backend
,
'auth_entry missing or invalid'
)
# If auth_entry is not in the session, we got here by a non-standard workflow.
# We simply assume 'login' in that case.
auth_entry
=
strategy
.
request
.
session
.
get
(
AUTH_ENTRY_KEY
,
AUTH_ENTRY_LOGIN
)
if
auth_entry
not
in
_AUTH_ENTRY_CHOICES
:
raise
AuthEntryError
(
strategy
.
request
.
backend
,
'auth_entry invalid'
)
return
{
'auth_entry'
:
auth_entry
}
...
...
common/djangoapps/third_party_auth/tests/specs/base.py
View file @
b77bff4d
...
...
@@ -929,11 +929,10 @@ class IntegrationTest(testutil.TestCase, test.TestCase):
with
self
.
assertRaises
(
pipeline
.
AuthEntryError
):
strategy
.
request
.
backend
.
auth_complete
=
mock
.
MagicMock
(
return_value
=
self
.
fake_auth_complete
(
strategy
))
def
test_pipeline_
raises_auth_entry_error
_if_auth_entry_missing
(
self
):
def
test_pipeline_
assumes_login
_if_auth_entry_missing
(
self
):
_
,
strategy
=
self
.
get_request_and_strategy
(
auth_entry
=
None
,
redirect_uri
=
'social:complete'
)
with
self
.
assertRaises
(
pipeline
.
AuthEntryError
):
strategy
.
request
.
backend
.
auth_complete
=
mock
.
MagicMock
(
return_value
=
self
.
fake_auth_complete
(
strategy
))
response
=
self
.
fake_auth_complete
(
strategy
)
self
.
assertEqual
(
response
.
url
,
reverse
(
'signin_user'
))
# pylint: disable=test-inherits-tests, abstract-method
...
...
lms/static/js/student_account/views/RegisterView.js
View file @
b77bff4d
...
...
@@ -95,7 +95,7 @@
if
(
this
.
autoSubmit
)
{
$
(
this
.
el
).
hide
();
$
(
'#register-honor_code'
).
prop
(
'checked'
,
true
);
$
(
'#register-honor_code
, #register-terms_of_service
'
).
prop
(
'checked'
,
true
);
this
.
submitForm
();
}
...
...
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