Skip to content
This repository was archived by the owner on Mar 8, 2026. It is now read-only.

CamiloTerevinto/TerevintoSoftware.PythonPkceClient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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) }

About

A Python package to deal with OAuth PKCE authentication flow to generate JWT tokens from desktop apps.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages