Python and OpenID Connect
A pure-Python OpenID Connect client supporting OAuth 2.1 authorization flows, built for Python 3.10+ with minimal dependencies.
OAuth 2.1 authorization flows include:
- the authorization code flow, for interactive user login;
- the client credentials flow, for confidential machine-to-machine communication.
This OIDC Client supports reading configuration profiles from a pyproject.toml file.
Prerequisites
Python 3.10+
Installation
pip install oidc-client
Configuration
To enable interactive login for your project, add the following to your pyproject.toml
:
[tool.oidc]
issuer = "https://'your_organization_name'.accounts.justpass.me/openid/" # URL of your OIDC provider
client_id = "Your_application_client_id"
- On Justpass.me settings add support of [PKCE].
Examples
To log-in as a user, using a web browser:
oidc login --interactive