Skip to main content

liboidcagent

A python library for requesting OpenID Connect access tokens from oidc-agent.

Usage

import liboidcagent as agent

token, issuer, expires_at = agent.get_token_response("iam")
token, issuer, expires_at = agent.get_token_response("iam", 60)

tokenresponse = agent.get_token_response("iam", application_hint="Example-Py-App")
tokenresponse = agent.get_token_response("iam", 60, "Example-Py-App")
tokenresponse = agent.get_token_response("iam", 60, "Example-Py-App", "openid profile email")
tokenresponse = agent.get_token_response("iam", 60, "Example-Py-App", "openid profile email", "foo bar")

token = agent.get_access_token("iam", 60, "Example-Py-App")

token, issuer, expires_at = agent.get_token_response_by_issuer_url("https://issuer.example.com", 60, "Example-Py-App")

token = agent.get_access_token_by_issuer_url("https://issuer.example.com", 60, "Example-Py-App")

Error Handling

The library will raise an exception of type OidcAgentError if something goes wrong.

Error Handling can be done the following way:

try:
    print(agent.get_access_token(account_name))
except agent.OidcAgentError as e:
    print("ERROR oidc-agent: {}".format(e))

Installation

pip install liboidcagent

License

liboidcagent is provided under the MIT License.

Metadata

Release files for liboidcagent 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for liboidcagent 0.6.0
File Size Uploaded
liboidcagent-0.6.0.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for liboidcagent 0.6.0
File Interpreter ABI Platform
liboidcagent-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.8 kB

Release files / liboidcagent-0.6.0.tar.gz

Download URL liboidcagent-0.6.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4eacb1cbbc9e23ea7869f2443a121669ff531b5d679867a1174a23a994a62967
BLAKE2b-256 checksum
How to use checksums
4892a7c300cb23460e985c55d39187f8458452c89f06a46d888585305df5fdaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / liboidcagent-0.6.0-py3-none-any.whl

Download URL liboidcagent-0.6.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52e1ff2e6283f814d5276f3d134f2e3c23a43d2751c17a01b3adf4ad6c41c97b
BLAKE2b-256 checksum
How to use checksums
5ed79aca4a864839fe177e025f94c13f86f4a03d06340c7ab20cb8679a5d18fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.3

3 release files

0.3.2

3 release files

0.3.1

3 release files

0.3.0

3 release files

0.2.2

3 release files

0.2.1

3 release files

0.2.0

3 release files

0.1.7

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page