django-oauthost
http://github.com/idlesign/django-oauthost
What’s that
Reusable application for Django to protect your apps with OAuth 2.0.
It allows to guard your application views with OAuth 2.0 in quite a trivial way.
Register your client using Django Admin or API:
from oauthost.toolbox import register_client
...
# Define some scopes to restrict our client to (if required).
my_scopes = ['polls:vote']
# `user` might be `request.user` if in a view.
register_client('My OAuth Client', 'my_client',
'http://someurl.com/myclient/', user, scopes_list=my_scopes)
...
Decorate your views with oauth_required (suppose in polls.views):
from oauthost.decorators import oauth_required
@oauth_required(scope_auto=True)
def vote(request, poll_id, variant_id):
...
Attach oauthost.urls to project urls (in urls.py):
from oauthost.urls import urlpatterns as oauthost_urlpatterns
urlpatterns = ... # Your actual urlpatterns are ommited.
urlpatterns += oauthost_urlpatterns
Now authorization endpoint is available at { BASE_URL }auth/ and token endpoint is available at { BASE_URL }token/.
That’s all for oauthost, connect using your client.
More information is available, read the docs!
Documentation
Metadata
Release files for django-oauthost 1.1.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 | |
|---|---|---|---|---|
| django-oauthost-1.1.1.tar.gz | 45.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_oauthost-1.1.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 111.3 kB
Release files / django-oauthost-1.1.1.tar.gz
| Download URL | django-oauthost-1.1.1.tar.gz |
|---|---|
| Size | 45.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ffa2404a959e1b102996f857424b67fac85f6177d6ae32010ee74718ce3b83a
|
|
BLAKE2b-256 checksum How to use checksums |
f2a428192612185af0ad0d12694f8ab849e56286f09afacdd60f6990ef6b68d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/2.7
|
Release files / django_oauthost-1.1.1-py2.py3-none-any.whl
| Download URL | django_oauthost-1.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 65.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
2ea7926d3f5c3451d0a8787874b737ea81a69a89bb0ae68f23acb5df98716fbe
|
|
BLAKE2b-256 checksum How to use checksums |
69c5faed57b9b8203c1df557d4f82183e9129d911a24e55af567ac17d90bbaca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/2.7
|
Security for django-oauthost 1.1.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.