Django rest framework authentication system.
- Registration
- Login
- Logout
- Users detail list
- Single user detail
- User update detail
- Delete user
- Change password
- Check password
$ git clone https://github.com/AmirAhrari/drf-auth.git && cd drf-auth
$ pip install -r requirements.txt
$ python manage.py migrate
$ python manage.py runserver
server has been started in http://localhost:8000/
Default URL: api/auth/register/
Method: POST
Inputs: username, email, password
Permissions: -
Response: id, username, email, password, token
Default URL: api/auth/login/
Method: POST
Inputs: username, password
Permissions: -
Response: user, token
Default URL: api/auth/logout/
Method: POST
Inputs: -
Permissions: IsAuthenticated
Response: HTTP_200_OK
Default URL: api/auth/users/
Method: GET
Inputs: -
Permissions: -
Response: users list (id, username, email)
Default URL: api/auth/users/<user_id>/ OR api/auth/users/self/
Method: GET
Inputs: -
Permissions: -
Response: id, username, email
Default URL: api/auth/users/<user_id>/ OR api/auth/users/self/
Method: PUT, PATCH
Inputs: username, email
Permissions: CurrentUserOrAdmin
Response: id, username, email
Default URL: api/auth/users/<user_id>/ OR api/auth/users/self/
Method: DELETE
Inputs: -
Permissions: CurrentUserOrAdmin
Response: HTTP_204_NO_CONTENT
Default URL: api/auth/change-password/
Method: POST
Inputs: old_password, new_password
Permissions: IsAuthenticated
Response: HTTP_200_OK
Default URL: api/auth/check-password/
Method: POST
Inputs: password
Permissions: IsAuthenticated
Response: HTTP_200_OK
- Reset password