Skip to main content

django-oauthost

https://github.com/idlesign/django-oauthost

release lic coverage

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.

  1. 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)

...
  1. 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):
    ...
  1. 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

https://django-oauthost.readthedocs.io/

Metadata

Release files for django-oauthost 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-oauthost 1.1.2
File Size Uploaded Provenance Actions
django_oauthost-1.1.2.tar.gz 26.9 kB Without provenance Details for django_oauthost-1.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-oauthost 1.1.2
File Interpreter ABI Platform Actions
django_oauthost-1.1.2-py3-none-any.whl Python 3 none any Details for django_oauthost-1.1.2-py3-none-any.whl

Total release size: 66.8 kB

Release files / django_oauthost-1.1.2.tar.gz

Download URL django_oauthost-1.1.2.tar.gz
Size 26.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1b445172250c8420bdc29efa5477a8f965c9de68a97dcf332c378a56948d92a0
BLAKE2b-256 checksum
How to use checksums
48f3fe90e3193f1d4eadbb9d3c92f35ee97873f0f3611d4ad3be99cf3b25446b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / django_oauthost-1.1.2-py3-none-any.whl

Download URL django_oauthost-1.1.2-py3-none-any.whl
Size 39.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b5f287dd289d5db8d607ae0276a98e2b54403bf674ee397c5102f1a71bd8474
BLAKE2b-256 checksum
How to use checksums
7bf5e7e38cd05d8a0af034d88f8b90a90e3264ddd87aa9335323968644b69fef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for django-oauthost 1.1.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page