Skip to main content

IAM V2 client library for EaseCation services (Python port of @easecation/iam-client)

Project description

easecation-iam-client

Python port of @easecation/iam-client. IAM V2 API wrapper for EaseCation services.

Install

pip install easecation-iam-client

Or from repo:

pip install -e packages/iam-client-py

Usage

from easecation_iam_client import IamClient, create_iam_client_from_env

# From env (IAM_BASE_URL, IAM_CLIENT_ID, IAM_CLIENT_SECRET)
client = create_iam_client_from_env()

# Or explicit config
client = IamClient(
    iam_base_url="https://iamapi.easecation.net",
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

# OAuth code exchange
tokens = client.exchange_oauth_code(code, redirect_uri)

# Verify access token
verify = client.verify_token(access_token)

# API key verification
api_key_data = client.verify_api_key(key_value)

# App session verification
valid = client.verify_app_session_token(app_session_token)

API

  • get_app_session_token(), invalidate_app_token()
  • exchange_oauth_code(code, redirect_uri)
  • verify_token(access_token), evict_from_verify_cache(access_token)
  • refresh_token(refresh_token), revoke_token(refresh_token)
  • get_jwks(), get_user_profile(access_token), get_user_bootstrap(...), get_hr_bootstrap_data(...)
  • verify_iam_callback_token(iam_token, ...), get_user_permissions(user_id, ...)
  • verify_api_key(key_value), evict_api_key_from_cache(key_value), clear_api_key_cache()
  • verify_app_session_token(app_session_token), clear_app_session_verify_cache()

ApiKeyRotationHelper for zero-downtime key rotation: create_new_key(...), revoke_key(key_id, ...), list_active_keys(owner_id?).

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

easecation_iam_client-1.3.3.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easecation_iam_client-1.3.3-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file easecation_iam_client-1.3.3.tar.gz.

File metadata

  • Download URL: easecation_iam_client-1.3.3.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for easecation_iam_client-1.3.3.tar.gz
Algorithm Hash digest
SHA256 fec3a923b0854ff10846c1f61c828c1091ee0bc07650007a8b23be0c4ab16e52
MD5 02169c6d90581f5f7e7dde1f5f3e4f9f
BLAKE2b-256 a46f576a0f38909c45ba9a5a59a383ba2f855fe5a578d6a6143a5dc2396e2ba8

See more details on using hashes here.

File details

Details for the file easecation_iam_client-1.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for easecation_iam_client-1.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b7e9c63429ec1df9ff05873d936f4b0d9b83fcad9ce523d9dd13034af5a4b63a
MD5 b53eb17573761ed6db98b87472e35f3e
BLAKE2b-256 645f69161488b52dd6a8b605804a8b6612cafc8116be6fe8952dd8b04d9d2050

See more details on using hashes here.

Supported by

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