Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 765 Bytes

README.md

File metadata and controls

38 lines (29 loc) · 765 Bytes

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