diff --git a/src/lib.rs b/src/lib.rs index 09b4b69..48cdd9e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -35,7 +35,7 @@ pub mod jwk; /// JWT header. #[non_exhaustive] -#[derive(Debug, Serialize, Deserialize, Default)] +#[derive(Clone, Debug, Serialize, Deserialize, Default)] pub struct Header { #[serde(skip_serializing_if = "Option::is_none")] pub typ: Option, @@ -113,7 +113,7 @@ impl<'a, T> Iterator for OneOrManyIter<'a, T> { #[serde_as] #[skip_serializing_none] #[non_exhaustive] -#[derive(Debug, Serialize, Default, Deserialize)] +#[derive(Clone, Debug, Serialize, Default, Deserialize)] pub struct Claims { #[serde_as(as = "Option>")] pub exp: Option, @@ -139,7 +139,7 @@ pub struct Claims { /// Use `serde_json::Map` for dynamic claims. /// /// Or define your own claims type which implements `Serialize`/`Deserialize`. -#[derive(Default, Debug)] +#[derive(Clone, Default, Debug)] pub struct HeaderAndClaims { header: Header, claims: Claims,