This release introduces support for SD-JWT operations within a WebAssembly (WASM) environment, expanding functionality to enable secure interactions between Issuers, Holders, and Verifiers in WebAssembly builds. Specifically, the additions expose SdJwtIssuer
, SdJwtHolder
, and SdJwtVerifier
modules, which allow clients to perform encoding, presentation creation, and verification of SD-JWTs directly in WASM.
Key Changes:
-
New WASM-Compatible Structs and Methods:
SdJwtIssuer
,SdJwtHolder
, andSdJwtVerifier
are now WASM-compatible, enabling:- Encoding: Issuers can encode claims with specified signing keys and algorithms.
- Verification: Holders can verify issuer tokens and create selective presentations, while Verifiers confirm holder presentations using configurable public keys and algorithms.
- Methods leverage
wasm_bindgen
to expose APIs, ensuring accessibility and compatibility for WebAssembly consumers.
-
Code Refactoring and Enhancements:
- Refactoring: Adjustments to
HashAlgorithm
andDisclosure
structs to support serialization and improve readability. - Error Handling: Expanded error enum to include
WasmJsValueConversionFailed
for seamless WASM error reporting, with mappings toJsValue
where applicable.
- Refactoring: Adjustments to
-
Build and Dependency Updates:
- Version bump in
Cargo.toml
to0.8.1
and addition of WASM-specific dependencies likeserde-wasm-bindgen
. - Minor updates in
.gitignore
to accommodate new build output.
- Version bump in
Impact:
This enhancement broadens the usage scenarios for SD-JWTs, enabling developers to leverage these features in web applications with WebAssembly. The changes promote interoperability and allow for flexible credential management within WASM contexts.