No description
  • Python 97.1%
  • HTML 2.9%
Find a file
Alan Crosswell f0091f1744
fix race condition for AccessToken creation in oauth2_validators (#611)
* work around race condition in which two threads both try to create the same AccessToken using update_or_create instead of two steps go get_or_create then update + save

* update changelog
2018-07-30 16:28:25 -04:00
docs Rename TokenHasMethodScopeAlternative to TokenMatchesOASRequirements 2018-05-16 07:21:53 +03:00
oauth2_provider fix race condition for AccessToken creation in oauth2_validators (#611) 2018-07-30 16:28:25 -04:00
tests Move scheme validation to OAuth2Application.clean() 2018-06-03 07:51:49 +03:00
.gitignore Don't require write scope for introspection 2018-03-19 15:40:55 +02:00
.travis.yml Drop Python 2.7 support 2018-04-14 12:08:52 +03:00
AUTHORS Update AUTHORS file 2017-04-24 18:12:40 +03:00
CHANGELOG.md fix race condition for AccessToken creation in oauth2_validators (#611) 2018-07-30 16:28:25 -04:00
CONTRIBUTING.md Added jazzband badges 2018-04-08 07:54:02 +02:00
LICENSE Add LICENSE 2013-05-22 11:31:06 +02:00
MANIFEST.in Add AUTHORS file MANIFEST.in and fixed setup.py 2013-06-03 09:48:20 +02:00
README.rst Fix Python requirement as 3.4+ 2018-07-08 06:48:33 +03:00
setup.cfg Release 1.2.0 2018-06-03 07:53:19 +03:00
setup.py Move tests outside of the oauth2_provider package 2017-03-09 08:40:21 +02:00
tox.ini tox: Use flake8-isort 2018-05-08 14:29:04 +03:00

Django OAuth Toolkit
====================

.. image:: https://jazzband.co/static/img/badge.svg
   :target: https://jazzband.co/
   :alt: Jazzband

*OAuth2 goodies for the Djangonauts!*

.. image:: https://badge.fury.io/py/django-oauth-toolkit.png
    :target: http://badge.fury.io/py/django-oauth-toolkit

.. image:: https://travis-ci.org/jazzband/django-oauth-toolkit.png
   :alt: Build Status
   :target: https://travis-ci.org/jazzband/django-oauth-toolkit

.. image:: https://coveralls.io/repos/github/jazzband/django-oauth-toolkit/badge.svg?branch=master
   :alt: Coverage Status
   :target: https://coveralls.io/github/jazzband/django-oauth-toolkit?branch=master


If you are facing one or more of the following:
 * Your Django app exposes a web API you want to protect with OAuth2 authentication,
 * You need to implement an OAuth2 authorization server to provide tokens management for your infrastructure,

Django OAuth Toolkit can help you providing out of the box all the endpoints, data and logic needed to add OAuth2
capabilities to your Django projects. Django OAuth Toolkit makes extensive use of the excellent
`OAuthLib <https://github.com/idan/oauthlib>`_, so that everything is
`rfc-compliant <http://tools.ietf.org/html/rfc6749>`_.

Contributing
------------

We love contributions, so please feel free to fix bugs, improve things, provide documentation. Just `follow the
guidelines <https://django-oauth-toolkit.readthedocs.io/en/latest/contributing.html>`_ and submit a PR.

Reporting security issues
-------------------------

Please report any security issues to the JazzBand security team at <security@jazzband.co>. Do not file an issue on the tracker.

Requirements
------------

* Python 3.4+
* Django 2.0+

Installation
------------

Install with pip::

    pip install django-oauth-toolkit

Add `oauth2_provider` to your `INSTALLED_APPS`

.. code-block:: python

    INSTALLED_APPS = (
        ...
        'oauth2_provider',
    )


If you need an OAuth2 provider you'll want to add the following to your urls.py.
Notice that `oauth2_provider` namespace is mandatory.

.. code-block:: python

    urlpatterns = [
        ...
        url(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
    ]

Changelog
---------

See `CHANGELOG.md <https://github.com/jazzband/django-oauth-toolkit/blob/master/CHANGELOG.md>`_.


Documentation
--------------

The `full documentation <https://django-oauth-toolkit.readthedocs.io/>`_ is on *Read the Docs*.

License
-------

django-oauth-toolkit is released under the terms of the **BSD license**. Full details in ``LICENSE`` file.