Description
--------
Djdg Django Oauth provides a simple signature middleware verification between apps
Support
-------
mail to zane.yang@hey900.com
Requirements
------------
* Python 2.7
* Django 1.9
Installation
------------
**Install with pip**
pip install djdg-django-oauth
**Add `djdg_oauth` to your `INSTALLED_APPS`**
INSTALLED_APPS = (
...
'djdg_oauth',
)
**run migrate to add tables:**
python manage.py migrate djdg_oauth
**list, add, del app secret:**
python manage.py listauthapp {app_name}
python manage.py addauthapp {app_name}
python manage.py delauthapp {app_name}
**add middleware**(**options**, *you can create yourself middleware with djdg_oauth.oauthclient.OauthClient.verify_request*):
MIDDLEWARE_CLASSES = (
...
'djdg_oauth.middleware.DjdgAuthMiddleware',
)
**add settings**(*app secret gaved by others*)
DJDG_AUTH = {
"APPS": [
{"appid": "xxxxxx", "secret": "xxxxxxxxxxxxxxxxxxx", "app": "xxx"},
....
]
"FULL_ESCAPE_URL": [....] # full match url to escape auth check,
"REGEX_ESCAPE_URL": [....] # regex match url to escape auth check,
"REGEX_CHECK_URL":[...] # need check url, if not empty, escape urls invalid
}
)
Documentation
--------------
**Verify request**
from djdg_oauth.oauthclient import OauthClient
auth = OauthClient()
auth.verify(request)
**Do request**
from djdg_oauth.oauthclient import OauthClient
request_data = {
"url": #url,
"app": #app type,
"parameters": #all request data,
"method": #request method,
"headers": #default None
}
OauthClient.oauth_request(**request_data)
License
-------
djdg-oauth is released under the terms of the **BSD license**. Full details in ``LICENSE`` file.
Changelog
---------
version 0.0.20
debug ascii error
Metadata
Release files for djdg-django-oauth 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| djdg-django-oauth-1.0.1.tar.gz | 8.5 kB | Without provenance | Details for djdg-django-oauth-1.0.1.tar.gz |
Release files / djdg-django-oauth-1.0.1.tar.gz
| Download URL | djdg-django-oauth-1.0.1.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
286fb98df4213f8b73c91c4236b9d31c872084911d3647529e74d059df903c6d
|
|
BLAKE2b-256 checksum How to use checksums |
1a59136aabd0eef27f1e1fdeb96594a738f08ad51863bf83f679172ce1d01c09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for djdg-django-oauth 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.