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 initto set up the local dev environment.make upto start the Docker dev stack.make teststo run tests in the dev container.
Common Tasks
make shellto open a shell in the dev container.make run-pre-committo run linting and formatting hooks.make buildto build the package artifacts.
Publishing
- Set a token:
export TWINE_PASSWORD=pypi-xxx make packageto publish to PyPI ormake testpackagefor TestPyPI.
Project Metadata
- Repo: https://github.com/icanbwell/cms-hte-ial2-reader
- Author: Imran Qureshi imran.qureshi@bwell.com
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)
| File | Size | Uploaded | |
|---|---|---|---|
| cms_hte_ial2_reader-0.0.2.tar.gz | 23.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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