Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
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
django-rest-framework
Commits
8b4ce5c6
Commit
8b4ce5c6
authored
Feb 04, 2015
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor authentication message improvement.
parent
d015534d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletions
+8
-1
env/pip-selfcheck.json
+2
-0
rest_framework/authentication.py
+6
-1
No files found.
env/pip-selfcheck.json
0 → 100644
View file @
8b4ce5c6
{
"last_check"
:
"2015-02-04T09:06:02Z"
,
"pypi_version"
:
"6.0.7"
}
\ No newline at end of file
rest_framework/authentication.py
View file @
8b4ce5c6
...
@@ -86,8 +86,13 @@ class BasicAuthentication(BaseAuthentication):
...
@@ -86,8 +86,13 @@ class BasicAuthentication(BaseAuthentication):
Authenticate the userid and password against username and password.
Authenticate the userid and password against username and password.
"""
"""
user
=
authenticate
(
username
=
userid
,
password
=
password
)
user
=
authenticate
(
username
=
userid
,
password
=
password
)
if
user
is
None
or
not
user
.
is_active
:
if
user
is
None
:
raise
exceptions
.
AuthenticationFailed
(
_
(
'Invalid username/password.'
))
raise
exceptions
.
AuthenticationFailed
(
_
(
'Invalid username/password.'
))
if
not
user
.
is_active
:
raise
exceptions
.
AuthenticationFailed
(
_
(
'User inactive or deleted.'
))
return
(
user
,
None
)
return
(
user
,
None
)
def
authenticate_header
(
self
,
request
):
def
authenticate_header
(
self
,
request
):
...
...
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