Skip to main content

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

TerevintoSoftware.PkceClient-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file TerevintoSoftware.PkceClient-0.1.0.tar.gz.

File metadata

File hashes

Hashes for TerevintoSoftware.PkceClient-0.1.0.tar.gz
Algorithm Hash digest
SHA256 da1ba1608dab27478297ec3a40dd78b6d66cc4f49c37a8b272330bf816e0d204
MD5 6fecb03e508f5d2bd36c22e2d7a5733d
BLAKE2b-256 561eff7978824bc80142bf6b2e905366f71b5c64f881653a9ffcf8a6528f39c2

See more details on using hashes here.

File details

Details for the file TerevintoSoftware.PkceClient-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for TerevintoSoftware.PkceClient-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c04a9ad74faaf40bc54cf13000b5630733d7f1493ea7cdd2d03fb559d830d2dc
MD5 62f0523baa7ad09d437d1a78aee92017
BLAKE2b-256 770d62e3f854874b314baf5228a9f1a165c2c8f0b81f8b81e9b1753a3d87ee3b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page