Skip to content

Authentication scheme for django rest framework that allow to use token in a url

License

Notifications You must be signed in to change notification settings

Develatio/drf-url-token-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

drf-url-token-auth

Simple token based authentication using rest_framework. Clients should authenticate by passing the token key in the "?token=" HTTP parameter. The token parametter can be configured.

Quick start

  1. Add "drf_url_token_auth" to INSTALLED_APPS:
INSTALLED_APPS = {
    ...
    "drf_url_token_auth"
}
  1. Modify rest framework settings:
REST_FRAMEWORK = {
    'DEFAULT_AUTHENTICATION_CLASSES': (
        'drf_url_token_auth.authentication.UrlTokenAuthentication',
    )
}
  1. Optionally, configure url parameter name (default: token)
DRF_URL_TOKEN_AUTH = {
    'PARAM_NAME': 'token'
}

Dev notes: build package: python setup.py sdist install: pip install --user drf-url-token-auth/dist/drf-url-token-auth-01.tar.gz

About

Authentication scheme for django rest framework that allow to use token in a url

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages