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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc2a36742f6be78c75d904da77609c6519e3702d26d3102ba59ce05672c791a2 |
|
MD5 | 4fb8d6b901dee038f118d9b8a90113dc |
|
BLAKE2b-256 | 92765a47226778867171d137a401976d5a0a6f3fee709f1de75ba9beaeb7b426 |
Close
Hashes for TerevintoSoftware.PkceClient-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c06844dffefaf039065b8e398b0003ca6618e207e0188911c016cfc14af3838a |
|
MD5 | 4027519812ed14a501cfc6330adad13c |
|
BLAKE2b-256 | 4f2257ae356ebc6114e3dae00a594b09f9c95ade2bfe79290ae9e9fd1a96f59e |