Skip to content

LamArt/django-restauth

This branch is 2 commits ahead of apptension/django-restauth:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b989564 · Apr 23, 2021

History

39 Commits
Apr 23, 2021
Jun 18, 2020
Jun 18, 2020
Sep 9, 2019
May 14, 2020
Jun 18, 2020
Jun 18, 2020
Apr 23, 2021
Apr 23, 2021
May 22, 2020
Jun 18, 2020
Jun 18, 2020
Feb 13, 2018
Jun 18, 2020
Feb 27, 2018

Repository files navigation

🍔 django-restauth

Build Status

Running

pip install pipenv
pipenv install
pipenv run python manage.py runserver

Usage

  • Modify your settings
# ..

AUTH_USER_MODEL = 'restauth.User'

REST_FRAMEWORK = {
    'DEFAULT_PERMISSION_CLASSES': (
        'rest_framework.permissions.IsAuthenticated',
    ),
    'DEFAULT_AUTHENTICATION_CLASSES': (
        'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
        'rest_framework.authentication.SessionAuthentication',
        'rest_framework.authentication.BasicAuthentication',
    ),
}

JWT_AUTH = {
    'JWT_ENCODE_HANDLER': 'restauth.jwt.encode_handler',
}

HASHID_FIELD_SALT = ''
  • Generate HASHID_FIELD_SALT

from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())

  • Modify urls.py

Features

  • Register user with profile in single API call
  • Login endpoint to return JWT token
  • User account activation endpoint
  • User profile endpoint
  • HashID for User primary key
  • Password reset & change endpoints
  • Add Swagger for API documentation
  • Ability to set user notification implementation
  • Health check endpoint with DB migrations validation
  • Two separate hosts, api & admin using django-hosts

About

🍔 Django REST User boilerplate

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 81.7%
  • Shell 15.1%
  • Dockerfile 2.9%
  • Makefile 0.3%