From 936c03751509670a8ddb35e2c92fe2d5404bfbd7 Mon Sep 17 00:00:00 2001 From: Tiago Nascimento Date: Fri, 13 Sep 2024 12:18:03 -0300 Subject: [PATCH 1/3] Make types module public Signed-off-by: Tiago Nascimento --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 17bbb12..02a9d3f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,7 +16,7 @@ pub mod profiles; pub mod proof_of_possession; pub mod pushed_authorization; pub mod token; -mod types; +pub mod types; pub use oauth2; From 3e96d6e2473c9ef1e0ab2f59a11cfc877a78add0 Mon Sep 17 00:00:00 2001 From: Tiago Nascimento Date: Wed, 2 Oct 2024 12:26:22 -0300 Subject: [PATCH 2/3] Fix JWT signing input generation Signed-off-by: Tiago Nascimento --- src/proof_of_possession.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/proof_of_possession.rs b/src/proof_of_possession.rs index 285d51b..daa001e 100644 --- a/src/proof_of_possession.rs +++ b/src/proof_of_possession.rs @@ -194,6 +194,7 @@ impl ProofOfPossession { let (header, payload) = self.to_unsigned_jwt()?; let json = serde_json::to_string(&header)?; let header = BASE64_URL_SAFE_NO_PAD.encode(json); + let payload = BASE64_URL_SAFE_NO_PAD.encode(&payload); let signing_input = [header.as_bytes(), b".", payload.as_bytes()] .concat() .to_vec(); From 8b9acf54708f361b05e3abe55b333187286702e6 Mon Sep 17 00:00:00 2001 From: Tiago Nascimento Date: Wed, 2 Oct 2024 13:36:16 -0300 Subject: [PATCH 3/3] Update to SSI 0.9 Signed-off-by: Tiago Nascimento --- Cargo.toml | 12 ++++++------ src/core/profiles/jwt_vc_json/credential_response.rs | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 44e52fb..774bb99 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,9 +14,9 @@ reqwest = ["oauth2/reqwest"] # TODO feature-gate isomdl = { git = "https://github.com/spruceid/isomdl", rev = "90ce218" } -ssi-claims = "0.1.0" -ssi-dids-core = "0.1.0" -ssi-jwk = "0.2.1" +ssi-claims = "0.1.1" +ssi-dids-core = "0.1.1" +ssi-jwk = "0.3.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" serde_with = "3.3.0" @@ -39,8 +39,8 @@ percent-encoding = "2.3.1" [dev-dependencies] assert-json-diff = "2.0.2" -did-jwk = "0.2.0" -did-method-key = "0.3.0" -ssi-verification-methods = "0.1.1" +did-jwk = "0.2.1" +did-method-key = "0.3.1" +ssi-verification-methods = "0.1.2" tokio = { version = "1.25.0", features = ["macros"] } oid4vci = { path = ".", features = ["reqwest"] } diff --git a/src/core/profiles/jwt_vc_json/credential_response.rs b/src/core/profiles/jwt_vc_json/credential_response.rs index 17e1632..e0035aa 100644 --- a/src/core/profiles/jwt_vc_json/credential_response.rs +++ b/src/core/profiles/jwt_vc_json/credential_response.rs @@ -1,5 +1,5 @@ use serde::{Deserialize, Serialize}; -use ssi_claims::CompactJWSString; +use ssi_claims::JwsBuf; use crate::profiles::CredentialResponseProfile; @@ -7,7 +7,7 @@ use crate::profiles::CredentialResponseProfile; pub struct CredentialResponse; impl CredentialResponseProfile for CredentialResponse { - type Type = CompactJWSString; + type Type = JwsBuf; } #[cfg(test)]