diff --git a/src/middleware/http/auth/jwt/ietf.rs b/src/middleware/http/auth/jwt/ietf.rs index 19a5d360..6d40a248 100644 --- a/src/middleware/http/auth/jwt/ietf.rs +++ b/src/middleware/http/auth/jwt/ietf.rs @@ -12,7 +12,7 @@ use typed_builder::TypedBuilder; /// claim names are collected in the `custom` map. /// See: #[serde_as] -#[derive(Debug, Deserialize, Serialize, TypedBuilder)] +#[derive(Debug, Clone, Deserialize, Serialize, TypedBuilder)] #[non_exhaustive] pub struct Claims { /// See: diff --git a/src/middleware/http/auth/jwt/mod.rs b/src/middleware/http/auth/jwt/mod.rs index 58ba0b12..d8816869 100644 --- a/src/middleware/http/auth/jwt/mod.rs +++ b/src/middleware/http/auth/jwt/mod.rs @@ -37,7 +37,6 @@ type BearerAuthHeader = TypedHeader>; /// the default will simply be a [serde_json::Value]. In all cases, the type can be overridden /// by the consumer. #[cfg_attr(feature = "open-api", derive(aide::OperationIo))] -// #[derive(Deserialize)] #[derive(Deserialize, Serialize)] #[non_exhaustive] pub struct Jwt { @@ -149,7 +148,7 @@ where /// See: /// See: // Intentionally not annotated with `#[non_exhaustive]` -#[derive(Debug, Deserialize, Serialize, PartialEq)] +#[derive(Debug, Clone, Deserialize, Serialize, PartialEq)] #[serde(untagged)] pub enum Subject { Uri(Url), diff --git a/src/middleware/http/auth/jwt/openid.rs b/src/middleware/http/auth/jwt/openid.rs index b6bd7f21..f7ecc2d8 100644 --- a/src/middleware/http/auth/jwt/openid.rs +++ b/src/middleware/http/auth/jwt/openid.rs @@ -14,7 +14,7 @@ use crate::util::serde::{deserialize_from_str, serialize_to_str, UriOrString}; /// claim names are collected in the `custom` map. /// See: #[serde_as] -#[derive(Debug, Deserialize, Serialize, TypedBuilder)] +#[derive(Debug, Clone, Deserialize, Serialize, TypedBuilder)] #[non_exhaustive] pub struct Claims { #[serde(rename = "iss")] @@ -62,7 +62,7 @@ pub struct Claims { } // Intentionally not annotated with `#[non_exhaustive]` -#[derive(Debug, Deserialize, Serialize, PartialEq)] +#[derive(Debug, Clone, Deserialize, Serialize, PartialEq)] #[serde(untagged)] pub enum Acr { Uri(Url),