django-rest-auth/docs/api_endpoints.rst

76 lines
1.3 KiB
ReStructuredText
Raw Normal View History

2014-10-09 15:01:47 +04:00
API endpoints
=============
Basic
-----
2014-10-09 16:16:39 +04:00
- /rest-auth/login/ (POST)
2014-10-09 15:01:47 +04:00
- username (string)
- password (string)
2014-10-09 16:16:39 +04:00
- /rest-auth/logout/ (POST)
2014-10-09 15:01:47 +04:00
2014-10-09 16:16:39 +04:00
- /rest-auth/password/reset/ (POST)
2014-10-09 15:01:47 +04:00
- email
2014-10-09 16:16:39 +04:00
- /rest-auth/password/reset/confim/ (POST)
2014-10-09 15:01:47 +04:00
- uid
- token
- new_password1
- new_password2
2014-10-09 16:16:39 +04:00
.. note:: uid and token are sent in email after calling /rest-auth/password/reset/
- /rest-auth/password/change/ (POST)
2014-10-09 15:01:47 +04:00
- new_password1
- new_password2
2014-10-09 16:16:39 +04:00
- /rest-auth/user/ (GET)
2014-10-09 15:01:47 +04:00
2014-10-09 16:16:39 +04:00
- /rest-auth/user/ (PUT/PATCH)
2014-10-09 15:01:47 +04:00
- username
- first_name
- last_name
- email
Registration
------------
2014-10-09 16:16:39 +04:00
- /rest-auth/registration/ (POST)
- username
- password1
- password2
- email
.. note:: This endpoint is based on ``allauth.account.views.SignupView`` and uses the same form as in this view. To override fields you have to create custom Signup Form and define it in django settings:
.. code-block:: python
ACCOUNT_FORMS = {
'signup': 'path.to.custom.SignupForm'
}
See allauth documentation for more details.
- /rest-auth/registration/verify-email/ (POST)
2014-10-09 16:16:39 +04:00
- key
Social Media Authentication
---------------------------
Basing on example from installation section :doc:`Installation </installation>`
- /rest-auth/facebook/ (POST)
- access_token