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.2.0

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.2.0
File Size Uploaded Provenance Actions
django_oauthost-1.2.0.tar.gz 27.3 kB Without provenance Details for django_oauthost-1.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 68.0 kB

Release files / django_oauthost-1.2.0.tar.gz

Download URL django_oauthost-1.2.0.tar.gz
Size 27.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fa7499f5db2d81401c4382ad5c70bd3dd6565fe9024d6a0cc14fd9b6f7711eed
BLAKE2b-256 checksum
How to use checksums
95df5828b8a04e6fec774c777640a50b6afaf6bd7cc4c839932c541a59e12252
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.2.0-py3-none-any.whl

Download URL django_oauthost-1.2.0-py3-none-any.whl
Size 40.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a6deea579f7459d63de4e8ac62449f98cb89a86ee7ae9623596fcd5928d9d48
BLAKE2b-256 checksum
How to use checksums
42effae84f93accb1e264661acedfc29e185896f52c241550059cf2dd53e8057
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.2.0

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