Skip to main content

OAuth Token generation API for handling OAuth 2.0 Authentication Code Flow based on social-auth

Project description

django-social-oauth-token

ci status pypi link codecov
supported python versions supported django versions

InstallationContributingHow To UseLicense

OAuthToken generation API for handling OAuth 2.0 Authentication Code Flow based on social-auth

Installation

  1. Use your preferred package manager (pip, poetry, pipenv) to install the package. For example:
$ poetry add django-social-oauth-token
  1. Then register 'social_oauth_token', in the 'INSTALLED_APPS' section of your project's settings.
# settings.py
...

INSTALLED_APPS = (
    ...
    'social_oauth_token',
)

...

How To Use

In order to verify the Authorization Code sent by the user and replace it with your own OAuth Access Token, send a POST request to the token/<backend>/ endpoint with client_id and code to receive the token.

The POST request parameters:

client_id # OAuth Client ID
code # Authorization Code

The JSON response:

{
  "access_token": <access_token>,
  "expires_in": <expires_in>,
  "token_type": <token_type>,
  "refresh_token": <refresh_token>,
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT License

Project details


Download files

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

Source Distribution

django-social-oauth-token-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_social_oauth_token-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file django-social-oauth-token-0.1.0.tar.gz.

File metadata

  • Download URL: django-social-oauth-token-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.10 CPython/3.8.12 Darwin/20.6.0

File hashes

Hashes for django-social-oauth-token-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3a092c6e4f725d45e92763e70801e003638c7dc0bdf6173f34822c257eeb9ff8
MD5 52ba91b95d5ed7e0621e9ff67d512b6e
BLAKE2b-256 e4dec26c9d2ab54068fffab2e09df87e819158f4dea864c85046928356d87e1b

See more details on using hashes here.

File details

Details for the file django_social_oauth_token-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_social_oauth_token-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dbf3e76795b8f1c2fdf5ee9248fe703404d58f45b86284b383f8fa668025d720
MD5 a032ed18871a26b9910012999f989dc0
BLAKE2b-256 ace6b24a3e3b449007b4c46622373722b1817a26deda0614b05ba21f7466d3eb

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