
Security News
libxml2 Maintainer Ends Embargoed Vulnerability Reports, Citing Unsustainable Burden
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
http://github.com/idlesign/django-oauthost
.. image:: https://img.shields.io/pypi/v/django-oauthost.svg :target: https://pypi.python.org/pypi/django-oauthost
.. image:: https://img.shields.io/pypi/l/django-oauthost.svg :target: https://pypi.python.org/pypi/django-oauthost
.. image:: https://img.shields.io/coveralls/idlesign/django-oauthost/master.svg :target: https://coveralls.io/r/idlesign/django-oauthost
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.
.. code-block:: python
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)
...
2. Decorate your views with oauth_required
(suppose in polls.views
):
.. code-block:: python
from oauthost.decorators import oauth_required
@oauth_required(scope_auto=True)
def vote(request, poll_id, variant_id):
...
3. Attach oauthost.urls
to project urls
(in urls.py
):
.. code-block:: python
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!
FAQs
Reusable application for Django to protect your apps with OAuth 2.0.
We found that django-oauthost demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.