Skip to content

An extension to Django-Rest-Frameworks Token Authentication, enabling a user to have multiple tokens

License

Notifications You must be signed in to change notification settings

EssaAlshammri/django-rest-multiauthtoken

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Rest Multi Token Auth

Work in progress

How to use

Django settings file:

INSTALLED_APPS = (
    ...
    'django.contrib.auth',
    ...
    'rest_framework',
    ...
    'django_rest_multitokenauth',
    ...
)

Django REST Framework Settings:

REST_FRAMEWORK = {
    ...
    'DEFAULT_AUTHENTICATION_CLASSES': [
        ...
        'django_rest_multitokenauth.coreauthentication.MultiTokenAuthentication',
        ...
    ],
    ...
}

Django url settings:

urlpatterns = [
    ...
    url(r'^api/auth/', include('django_rest_multitokenauth.urls', namespace='multi_token_auth')),
    ...
]    

The following endpoints are provided:

  • login
  • logout

About

An extension to Django-Rest-Frameworks Token Authentication, enabling a user to have multiple tokens

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%