Skip to main content

django-rest-signature for multisite

Project description

django-rest-signature是一个多站点的网站签名

Overview

这个包支持 Django REST framework.


Requirements

  • python(3.4)

  • Django(1.8)

  • Django REST Framework (3.1.0)

  • PyJwt


只在上述环境中测试过

Installation

install using pip

$ pip install django-rest-signature

Settings

在INSTALLED_APPS 中增加 ‘rest_signature’.

INSTALLED_APPS = (
    ....
    'rest_signature',
)

在MIDDLEWARE_CLASSES 中 AuthenticationMiddleware之前增加 ‘rest_signature.middleware.SignatureMiddleware’

MIDDLEWARE_CLASSES = (
    ...
    'rest_signature.middleware.SignatureMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    ...
)

Usage

通过request.site获取 site 对象


Issue

  1. 对GET和非GET请求未处理

Project details


Download files

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

Source Distribution

django-rest-signature-0.0.2.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

django_rest_signature-0.0.2-py3.4.egg (10.2 kB view hashes)

Uploaded Source

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