Skip to main content
https://travis-ci.org/wndhydrnt/python-oauth2.png?branch=master

python-oauth2 is a framework that aims at making it easy to provide authentication via OAuth 2.0 within an application stack.

Status

python-oauth2 is currently not ready for use in production environments. While the basic implementations work already pretty well, some types of authorization Grants defined in the RFC are still missing. Also some features like Refreh Tokens have not been implemented yet.

Installation

python-oauth2 is available on PyPI

pip install python-oauth2

Usage

Storage adapters

python-oauth2 handles the request/response flow needed to create a OAuth 2.0 token. It does not define how a token is stored so you can choose the persistence strategy that works best for you. It is possible to write a token to mysql or mongodb for persistence, save it in memcache or redis for fast access or mix both approaches. This flexibility is achieved by the use of storage adapters that define an interface which is called by a Grant handler during processing.

The oauth2.store module defines base classes for each type of storage. Also take a look at the examples in the examples directory of the project.

Site adapter

Like for storage, python-oauth2 does not define how you identify a user or show a confirmation dialogue. Instead your application should use the API defined by oauth2.web.SiteAdapter.

Changelog

New in version 0.2.0

  • Support for scopes

  • Local token and client stores

  • Memcache token store

  • Support for Python 2.6, 3.2 and 3.3

New in version 0.1.0

  • Working implementation of Authorization Code Grant

  • Working implementation of Implicit Grant

  • Working implementation of Resource Owner Password Credentials Grant

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-oauth2-0.2.0.tar.gz (16.1 kB view details)

Uploaded Source

File details

Details for the file python-oauth2-0.2.0.tar.gz.

File metadata

  • Download URL: python-oauth2-0.2.0.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for python-oauth2-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b8576c02979b84d0d3e7177d244377006ac598afe139557fa536bcb81cc1e39d
MD5 f06c8eb8778b93b1a4ef0a2fcb42fde2
BLAKE2b-256 2972dcaffcabdbfdfadb50cc0fd99ac5ba333933df27d8f290212ac45e28391d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page