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
7a5937f5
Commit
7a5937f5
authored
Jun 13, 2014
by
Matt Drayer
Committed by
Jonathan Piacenti
Aug 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mattdrayer/api-authn-401to403: Changed error response from 401 to 403 Forbidden
parent
282bddd4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
lms/djangoapps/api_manager/sessions/tests.py
+1
-1
lms/djangoapps/api_manager/sessions/views.py
+1
-1
No files found.
lms/djangoapps/api_manager/sessions/tests.py
View file @
7a5937f5
...
...
@@ -105,7 +105,7 @@ class SessionsApiTests(TestCase):
user
.
save
()
data
=
{
'username'
:
local_username
,
'password'
:
self
.
test_password
}
response
=
self
.
do_post
(
self
.
base_sessions_uri
,
data
)
self
.
assertEqual
(
response
.
status_code
,
40
1
)
self
.
assertEqual
(
response
.
status_code
,
40
3
)
def
test_session_list_post_invalid_notfound
(
self
):
data
=
{
'username'
:
'user_12321452334'
,
'password'
:
self
.
test_password
}
...
...
lms/djangoapps/api_manager/sessions/views.py
View file @
7a5937f5
...
...
@@ -98,7 +98,7 @@ class SessionsList(SecureAPIView):
# add to audit log
AUDIT_LOG
.
info
(
u"API::User logged in successfully with user-id - {0}"
.
format
(
user
.
id
))
else
:
response_status
=
status
.
HTTP_40
1_UNAUTHORIZED
response_status
=
status
.
HTTP_40
3_FORBIDDEN
else
:
limiter
.
tick_bad_request_counter
(
request
)
# tick the failed login counters if the user exists in the database
...
...
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