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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 184857dd9541b4a291b3671a63f0bdf5c91034016cdce69ad0db1d56cde65799 |
|
MD5 | cc9a1bfda95b0d67184597aab8fe4cd6 |
|
BLAKE2b-256 | 36365daf03fe58b8f2c28c9261393b2a0978fe3e6154ef9ebbc979821533cb91 |
Close
Hashes for TerevintoSoftware.PkceClient-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b94b5081b65ce282e186aecc0deb715805fa2c86d89d16e5f688fe9b3ae4cdc |
|
MD5 | 0e3b35fa53fdc45d7a0f4f5e14513f62 |
|
BLAKE2b-256 | 4c838c0952ac4d66fd8e6258b182aa920720d8db1435454fbcc19bf8d1936fb9 |