Skip to main content

cms-hte-ial2-reader

Reads IAL2 token, verifies digital signature and returns FHIR Patient resource

Accepts a signed JWT (ID Token) from a Credential Service Provider (CSP), verifies the signature via JWKS, extracts demographics per the CSP payload specification V7.1, and returns a FHIR R4 Patient resource.

Usage

from cmshteial2reader import IAL2Extractor, TokenVerifier

verifier = TokenVerifier(
    jwks_uri="https://idp.example.com/.well-known/jwks.json",
    audience="my-client-id",
)
extractor = IAL2Extractor(verifier=verifier)
patient = await extractor.extract(token_string)
# patient is a FHIR R4 Patient resource dict

To accept tokens from any issuer on an explicit allow list (rather than a single pinned issuer), use MultiIssuerTokenVerifier in place of TokenVerifier:

from cmshteial2reader import IAL2Extractor, MultiIssuerTokenVerifier

verifier = MultiIssuerTokenVerifier.from_env(audience="my-client-id")
extractor = IAL2Extractor(verifier=verifier)
patient = await extractor.extract(token_string)

MultiIssuerTokenVerifier.from_env reads its whitelist of trusted JWKS URLs from the IAL2_ALLOWED_JWKS_URLS environment variable (comma-separated).

Quickstart

  • make init to set up the local dev environment.
  • make up to start the Docker dev stack.
  • make tests to run tests in the dev container.

Common Tasks

  • make shell to open a shell in the dev container.
  • make run-pre-commit to run linting and formatting hooks.
  • make build to build the package artifacts.

Publishing

  • Set a token: export TWINE_PASSWORD=pypi-xxx
  • make package to publish to PyPI or make testpackage for TestPyPI.

Project Metadata

Metadata

Release files for cms-hte-ial2-reader 0.0.2

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

Source distribution (sdist)

Source distribution for cms-hte-ial2-reader 0.0.2
File Size Uploaded
cms_hte_ial2_reader-0.0.2.tar.gz 23.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cms-hte-ial2-reader 0.0.2
File Interpreter ABI Platform
cms_hte_ial2_reader-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 42.5 kB

Release files / cms_hte_ial2_reader-0.0.2.tar.gz

Download URL cms_hte_ial2_reader-0.0.2.tar.gz
Size 23.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e0bec7f3597e265dc3b3991a7fd481c9cc3adb860d60a0dea1d1941b88f68e4f
BLAKE2b-256 checksum
How to use checksums
64a8b497829db6b766fb4b65c8d637b5b522e075533d992fcff20eede1fa9155
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release files / cms_hte_ial2_reader-0.0.2-py3-none-any.whl

Download URL cms_hte_ial2_reader-0.0.2-py3-none-any.whl
Size 18.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2eff14e7b21d945c98bbf051a103a636a51b0312529f2895411863539548101
BLAKE2b-256 checksum
How to use checksums
3e353e008e895fc22fa73ab30c96e775bef97f94460edd62ab9b1941cf3a7113
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release history Release notifications | RSS feed

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

This release

0.0.2 This release

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