DRF Authentication
Quickstart
For installing django-drf-auth, just run this command in your shell
pip install django-drf-auth
settings
INSTALLED_APPS = (
# ...
'django.contrib.sites',
'rest_auth',
'allauth',
'allauth.account',
'rest_auth.registration',
'drf_auth',
)
FRONT_URL = ''
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_PORT = 587
REST_USE_JWT = True
SITE_ID = 1
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
ACCOUNT_EMAIL_REQUIRED = True
FRONT_URL -> this is your url https://www.example.com
URLS
urlpatterns = [
# ...
path('drf_auth/', include('drf_auth.urls')),
]
API Endpoints:
Register
Method: POST
Endpoint: /registration/
Payload:
{ "username": "USERNAME", "password1": "PASSWORD", "password2": "PASSWORD", "email": "EMAIL" }
Register Confirm Email
Method: POST
Endpoint: /account-confirm-email/<str:key>/
Payload:
{ "key": "KEY", }
Login
Method: POST
Endpoint: /login/
Payload:
{ "username": "USERNAME", "password": "PASSWORD" }
Logout
Method: POST
Endpoint: /logout/
Headers: Authorization: JWT YOUR_TOKEN_HERE
Change Password
Method: POST
Endpoint: /password/change/
Payload:
{ "old_password": "OLD PASSWORD", "new_password1": "NEW PASSWORD1", "new_password2": "NEW PASSWORD2" }
Reset Password
Method: POST
Endpoint: /password/reset/
Payload:
`{
"email": "EMAIL ADDRESS",
}`
Reset Password Confirm
Method: POST
Endpoint: /password/reset/confirm/<str:uid>/<str:token>/
Payload:
`{
"uid": "UID",
"token": "token",
}`
Reset Password Confirm
Method: GET
Endpoint: /user/
Headers: Authorization: JWT YOUR_TOKEN_HERE
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.
License
MIT
Metadata
Release files for django-drf-auth 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-drf-auth-0.1.tar.gz | 5.6 kB | Without provenance | Details for django-drf-auth-0.1.tar.gz |
Release files / django-drf-auth-0.1.tar.gz
| Download URL | django-drf-auth-0.1.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
954703b8d9f5f3966cbd63d1b0a42f0d38d47694945893553850b7bc9d217c02
|
|
BLAKE2b-256 checksum How to use checksums |
c9e78e92bb865f2c7ea1cdf2f1e8b30cc361007c95a79de83bc8f4be1cbf3152
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3
|
Security for django-drf-auth 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.