From 7203f324998791ea91d3aa8c5f5d0d05a6600d1c Mon Sep 17 00:00:00 2001 From: Chris Joel <0xcda7a@gmail.com> Date: Fri, 1 Apr 2022 15:28:19 -0700 Subject: [PATCH] Omit unused nbf and nnc --- ucan-key-support/Cargo.toml | 4 ++-- ucan/Cargo.toml | 2 +- ucan/src/ucan.rs | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ucan-key-support/Cargo.toml b/ucan-key-support/Cargo.toml index c61d03a8..d035915d 100644 --- a/ucan-key-support/Cargo.toml +++ b/ucan-key-support/Cargo.toml @@ -14,14 +14,14 @@ repository = "https://github.com/cdata/rs-ucan/" homepage = "https://github.com/cdata/rs-ucan" license = "Apache-2.0" readme = "README.md" -version = "0.3.0-alpha.5" +version = "0.3.0-alpha.6" [features] default = [] web = ["wasm-bindgen", "wasm-bindgen-futures", "js-sys", "web-sys", "ucan/web", "getrandom/js"] [dependencies] -ucan = {path = "../ucan", version = "0.5.0-alpha.5" } +ucan = {path = "../ucan", version = "0.5.0-alpha.6" } anyhow = "1.0.52" async-trait = "0.1.52" ed25519-zebra = "^3" diff --git a/ucan/Cargo.toml b/ucan/Cargo.toml index bd54094a..df9482c4 100644 --- a/ucan/Cargo.toml +++ b/ucan/Cargo.toml @@ -13,7 +13,7 @@ repository = "https://github.com/cdata/rs-ucan/" homepage = "https://github.com/cdata/rs-ucan" license = "Apache-2.0" readme = "README.md" -version = "0.5.0-alpha.5" +version = "0.5.0-alpha.6" edition = "2021" [features] diff --git a/ucan/src/ucan.rs b/ucan/src/ucan.rs index 912dee32..a140f93e 100644 --- a/ucan/src/ucan.rs +++ b/ucan/src/ucan.rs @@ -5,7 +5,6 @@ use serde_json::Value; use std::str; use std::sync::Arc; -// use crate::crypto::did::{did_to_signing_key, SigningKeyResult}; use crate::crypto::did::DidParser; use crate::time::now; @@ -21,7 +20,9 @@ pub struct UcanPayload { pub iss: String, pub aud: String, pub exp: u64, + #[serde(skip_serializing_if = "Option::is_none")] pub nbf: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub nnc: Option, pub att: Vec, pub fct: Vec,