lepture/authlib

View on GitHub
docs/specs/rfc6749.rst

Summary

Maintainability
Test Coverage
.. _specs/rfc6749:

RFC6749: The OAuth 2.0 Authorization Framework
==============================================

.. meta::
    :description: API references of RFC6749 in Python implementation.
        Learn how to create an OAuth 2.0 provider in Python.

This section contains the generic implementation of RFC6749_. You should
read :ref:`intro_oauth2` at first. Here are some tips:

1. Have a better understanding of :ref:`OAuth 2.0 <intro_oauth2>`
2. How to use :ref:`oauth_2_session` for Requests
3. How to implement :ref:`flask_client`
4. How to implement :ref:`flask_oauth2_server`
5. How to implement :ref:`django_client`
6. How to implement :ref:`django_oauth2_server`

.. _RFC6749: https://tools.ietf.org/html/rfc6749

API References
--------------

Here are the API references for developers. For framework level interfaces,
check:

Servers
~~~~~~~

.. module:: authlib.oauth2.rfc6749

.. autoclass:: AuthorizationServer
    :members:

.. autoclass:: ResourceProtector
    :members:

Client Model
~~~~~~~~~~~~

.. autoclass:: ClientMixin
    :members:

.. _specs/rfc6949-errors:

Token Model
~~~~~~~~~~~

.. autoclass:: AuthorizationCodeMixin
    :members:

.. autoclass:: TokenMixin
    :members:

Errors
~~~~~~

.. autoclass:: OAuth2Error
    :members:

.. autoclass:: InsecureTransportError
    :members:

.. autoclass:: InvalidRequestError

.. autoclass:: InvalidClientError

.. autoclass:: InvalidGrantError

.. autoclass:: UnauthorizedClientError

.. autoclass:: UnsupportedGrantTypeError

.. autoclass:: InvalidScopeError

.. autoclass:: AccessDeniedError

Grant Types
~~~~~~~~~~~

.. module:: authlib.oauth2.rfc6749.grants

.. autoclass:: AuthorizationCodeGrant
    :member-order: bysource
    :members:

.. autoclass:: ImplicitGrant
    :member-order: bysource
    :members:

.. autoclass:: ResourceOwnerPasswordCredentialsGrant
    :member-order: bysource
    :members:

.. autoclass:: ClientCredentialsGrant
    :member-order: bysource
    :members:

.. autoclass:: RefreshTokenGrant
    :member-order: bysource
    :members: