Skip to main content

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

Project description

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 "gitlab_webhook" 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

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drf-url-token-auth-0.1.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

drf_url_token_auth-0.1-py2-none-any.whl (3.8 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page