A Python package to deal with OAuth PKCE authentication flow to generate JWT tokens from desktop apps.
Project description
Python PKCE Client
This python package contains a simple client to request tokens using the OAuth 2/OIDC Authorization Code PKCE flow.
Sample usage
from terevintosoftware.pkce_client import PkceClient, PkceLoginConfig
config = PkceLoginConfig(
authorization_uri="https://localhost:44300/connect/authorize",
token_uri="https://localhost:44300/connect/token",
scopes=[ "openid", "profile", "api" ],
client_id="python-nb",
internal_port=8888,
add_random_state=True,
random_state_length=32,
verify_authorization_server_https=False
)
login_client = PkceClient(config)
pkce_token = login_client.login()
headers = { "Authorization": "Bearer " + str(pkce_token.access_token) }
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
Built Distribution
Close
Hashes for TerevintoSoftware.PkceClient-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac13e2601b96f28e54d5f46d3242e24506d0a8cc31dbe5dbae1631f0d0b2c4c6 |
|
MD5 | 35bddae872e0684164ab0d31b7e8931f |
|
BLAKE2b-256 | 9a2b0766396dd7fbd424a13fcf0212e37fa84f9fdc06b498d1bc0af6f89fc504 |
Close
Hashes for TerevintoSoftware.PkceClient-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06488af5a4319fde857904bc2aa7fe55ba1fcf6546c1948baca77c84d8f948e4 |
|
MD5 | 68bd4941d096b7293ee4f2326db9206e |
|
BLAKE2b-256 | 53ce887f6d055a5160f6347ec7d4dde813b23a786d4276a545b63f8b986966bf |