OAuth 2.0 compliant client and server library.
Project description
pyoauth2: OAuth 2.0 Client and Provider Library
===============================================
Supported Request Flows
-----------------------
(1) Authorization Code Grant :: OAuth 2 Section 4.1
(1A) Authorization Request :: OAuth 2 Section 4.1.1
[For browser apps this happens in the window]
Request: GET /get_authorization_code
?response_type=code
&client_id={CLIENT_ID}
&redirect_uri={REDIRECT_URI}
[&state={STATE}]
[&scope={SCOPE}]
Response: HTTP 302
Location={REDIRECT_URI}
?code={CODE}
&state={STATE}
Error Response: HTTP 302
Location={REDIRECT_URI}
?error=access_denied
&state={STATE}
(1B) Access Token Request :: OAuth 2 Section 4.1.3
[Server side only]
Request: GET /get_access_token
?grant_type=authorization_code
&client_id={CLIENT_ID}
&client_secret={CLIENT_SECRET}
&redirect_uri={REDIRECT_URI}
&code={CODE}
Response: HTTP 200
{
"access_token": "{ACCESS_TOKEN}",
"token_type": "{TOKEN_TYPE}", // See OAuth 2 Section 7.1 Access Token Types
"expires_in": 3600,
"refresh_token": "{REFRESH_TOKEN}"
}
Error Response: HTTP 400
{
"error": "access_denied",
"error_description": "User does not have access to the team."
}
===============================================
Supported Request Flows
-----------------------
(1) Authorization Code Grant :: OAuth 2 Section 4.1
(1A) Authorization Request :: OAuth 2 Section 4.1.1
[For browser apps this happens in the window]
Request: GET /get_authorization_code
?response_type=code
&client_id={CLIENT_ID}
&redirect_uri={REDIRECT_URI}
[&state={STATE}]
[&scope={SCOPE}]
Response: HTTP 302
Location={REDIRECT_URI}
?code={CODE}
&state={STATE}
Error Response: HTTP 302
Location={REDIRECT_URI}
?error=access_denied
&state={STATE}
(1B) Access Token Request :: OAuth 2 Section 4.1.3
[Server side only]
Request: GET /get_access_token
?grant_type=authorization_code
&client_id={CLIENT_ID}
&client_secret={CLIENT_SECRET}
&redirect_uri={REDIRECT_URI}
&code={CODE}
Response: HTTP 200
{
"access_token": "{ACCESS_TOKEN}",
"token_type": "{TOKEN_TYPE}", // See OAuth 2 Section 7.1 Access Token Types
"expires_in": 3600,
"refresh_token": "{REFRESH_TOKEN}"
}
Error Response: HTTP 400
{
"error": "access_denied",
"error_description": "User does not have access to the team."
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyoauth2-je-0.0.1.tar.gz
(8.9 kB
view details)
File details
Details for the file pyoauth2-je-0.0.1.tar.gz
.
File metadata
- Download URL: pyoauth2-je-0.0.1.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 549f6122780a7216689288689e194c5eb183bd2c629004447e5761d29e8474dd |
|
MD5 | 93d6ee2c2e26b90bf23d5fe1813befe8 |
|
BLAKE2b-256 | bb4a1b32f9f9bd54678643cb07e19e5562f74c6bc3a7cdfdbf96c33b7329e132 |