Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
ParsePy
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
OpenEdx
ParsePy
Commits
653faa67
Commit
653faa67
authored
Oct 18, 2017
by
ctrongminh
Committed by
GitHub
Oct 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add logout method for User
parent
1623d6dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
parse_rest/user.py
+6
-0
No files found.
parse_rest/user.py
View file @
653faa67
...
...
@@ -75,6 +75,12 @@ class User(ParseResource):
session_header
=
{
'X-Parse-Session-Token'
:
self
.
sessionToken
}
return
User
.
DELETE
(
self
.
_absolute_url
,
extra_headers
=
session_header
)
@login_required
def
logout
(
self
):
logout_url
=
'/'
.
join
([
API_ROOT
,
'logout'
])
session_header
=
{
'X-Parse-Session-Token'
:
self
.
sessionToken
}
return
User
.
POST
(
logout_url
,
extra_headers
=
session_header
)
@classmethod
def
signup
(
cls
,
username
,
password
,
**
kw
):
response_data
=
User
.
POST
(
''
,
username
=
username
,
password
=
password
,
**
kw
)
...
...
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