Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippGackstatter committed Sep 20, 2023
1 parent 409d9d1 commit a9d20b7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
13 changes: 8 additions & 5 deletions bindings/wasm/src/did/wasm_core_document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,8 @@ impl WasmCoreDocument {
/// Regardless of which options are passed the following conditions must be met in order for a verification attempt to
/// take place.
/// - The JWS must be encoded according to the JWS compact serialization.
/// - The `kid` value in the protected header must be an identifier of a verification method in this DID document.
/// - The `kid` value in the protected header must be an identifier of a verification method in this DID document,
/// or set explicitly in the `options`.
#[wasm_bindgen(js_name = verifyJws)]
#[allow(non_snake_case)]
pub fn verify_jws(
Expand Down Expand Up @@ -668,8 +669,9 @@ impl WasmCoreDocument {
/// Produces a JWT where the payload is produced from the given `credential`
/// in accordance with [VC Data Model v1.1](https://www.w3.org/TR/vc-data-model/#json-web-token).
///
/// The `kid` in the protected header is the `id` of the method identified by `fragment` and the JWS signature will be
/// produced by the corresponding private key backed by the `storage` in accordance with the passed `options`.
/// Unless the `kid` is explicitly set in the options, the `kid` in the protected header is the `id`
/// of the method identified by `fragment` and the JWS signature will be produced by the corresponding
/// private key backed by the `storage` in accordance with the passed `options`.
#[wasm_bindgen(js_name = createCredentialJwt)]
pub fn create_credential_jwt(
&self,
Expand Down Expand Up @@ -698,8 +700,9 @@ impl WasmCoreDocument {
/// Produces a JWT where the payload is produced from the given presentation.
/// in accordance with [VC Data Model v1.1](https://www.w3.org/TR/vc-data-model/#json-web-token).
///
/// The `kid` in the protected header is the `id` of the method identified by `fragment` and the JWS signature will be
/// produced by the corresponding private key backed by the `storage` in accordance with the passed `options`.
/// Unless the `kid` is explicitly set in the options, the `kid` in the protected header is the `id`
/// of the method identified by `fragment` and the JWS signature will be produced by the corresponding
/// private key backed by the `storage` in accordance with the passed `options`.
#[wasm_bindgen(js_name = createPresentationJwt)]
pub fn create_presentation_jwt(
&self,
Expand Down
3 changes: 2 additions & 1 deletion identity_document/src/document/core_document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,8 @@ impl CoreDocument {
/// Regardless of which options are passed the following conditions must be met in order for a verification attempt to
/// take place.
/// - The JWS must be encoded according to the JWS compact serialization.
/// - The `kid` value in the protected header must be an identifier of a verification method in this DID document.
/// - The `kid` value in the protected header must be an identifier of a verification method in this DID document,
/// or set explicitly in the `options`.
//
// NOTE: This is tested in `identity_storage` and `identity_credential`.
pub fn verify_jws<'jws, T: JwsVerifier>(
Expand Down
5 changes: 3 additions & 2 deletions identity_storage/src/storage/jwk_document_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ pub trait JwkDocumentExt: private::Sealed {
/// Produces a JWT where the payload is produced from the given `presentation`
/// in accordance with [VC Data Model v1.1](https://www.w3.org/TR/vc-data-model/#json-web-token).
///
/// The `kid` in the protected header is the `id` of the method identified by `fragment` and the JWS signature will be
/// produced by the corresponding private key backed by the `storage` in accordance with the passed `options`.
/// Unless the `kid` is explicitly set in the options, the `kid` in the protected header is the `id`
/// of the method identified by `fragment` and the JWS signature will be produced by the corresponding
/// private key backed by the `storage` in accordance with the passed `options`.
async fn create_presentation_jwt<K, I, CRED, T>(
&self,
presentation: &Presentation<CRED, T>,
Expand Down

0 comments on commit a9d20b7

Please sign in to comment.