Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wrappers for JWT and JWS #1160

Merged
merged 10 commits into from
May 10, 2023

Conversation

abdulmth
Copy link
Contributor

@abdulmth abdulmth commented May 7, 2023

Description of change

Introduce wrappers around JWT and JWS tokens, also rename CredentialToken to DecodedJwtCredential and Token to DecodedJws in WASM.

@abdulmth abdulmth changed the title Feat/jwt jws wrappers Add wrappers for JWT and JWS May 7, 2023
@abdulmth abdulmth self-assigned this May 8, 2023
@abdulmth abdulmth added No changelog Excludes PR from becoming part of any changelog Wasm Related to Wasm bindings. Becomes part of the Wasm changelog Chore Tedious, typically non-functional change Rust Related to the core Rust code. Becomes part of the Rust changelog. labels May 8, 2023
Copy link
Contributor

@PhilippGackstatter PhilippGackstatter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

identity_credential/src/credential/jws.rs Outdated Show resolved Hide resolved
identity_credential/src/credential/jwt.rs Outdated Show resolved Hide resolved
identity_credential/src/credential/jws.rs Show resolved Hide resolved
identity_credential/src/credential/jwt.rs Show resolved Hide resolved
identity_credential/src/credential/jws.rs Outdated Show resolved Hide resolved
identity_credential/src/credential/jwt.rs Outdated Show resolved Hide resolved
bindings/wasm/src/credential/jwt.rs Outdated Show resolved Hide resolved
bindings/wasm/src/credential/jws.rs Outdated Show resolved Hide resolved
bindings/wasm/src/did/wasm_core_document.rs Outdated Show resolved Hide resolved
@abdulmth abdulmth merged commit 9c0c071 into feat/jwk-storage-document-ext-2 May 10, 2023
PhilippGackstatter added a commit that referenced this pull request May 12, 2023
* take changes from branch `jwk-storage-document-ext`

* minor comments

* add constructor for `WasmJwtCredentialValidationOptions`

* minor fixes

* Fix RevocationBitmap typo

* Return `CredentialToken<T>` where possible

* Improve error messages

* Improve method name

* Improve error messages, remove resolved TODOs

* Wasm cleanup

* Remove the removed `JwkStorage.public` method

* Fix clippy lints

* Test some cases for credential validation

* Update `b64` docs in WasmJwsSignatureOptions

* Add nonce verification during credential verif.

* Add `b64=false` and `detached=true` test

* Remove user-facing `crit` JOSE parameter

* Add test setup and organize tests

* Add wrappers for  JWT and JWS (#1160)

* Add more credential validator tests

* Add custom error for external extensibility

* Make source in custom error optional

* Regenerate api-reference, remove crits

* Add missing license header

* Fix const/static clippy lint

* Elide lifetimes; fix documented type

* fix output handling

* Add `std_rng` feature on `rand`

* Fix `--features credential` dead code

* make rustup failable

* Update expected error in delete_did example

---------

Co-authored-by: Philipp Gackstatter <philipp.gackstatter@iota.org>
Co-authored-by: Eike Haß <eike-hass@web.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chore Tedious, typically non-functional change No changelog Excludes PR from becoming part of any changelog Rust Related to the core Rust code. Becomes part of the Rust changelog. Wasm Related to Wasm bindings. Becomes part of the Wasm changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants