From 0c3cdee5ee8f0311a351e55208a6a5bfdf3bfcb8 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 4 Sep 2018 14:40:41 +0200 Subject: [PATCH] chore: Make JWKS type Cloneable --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 2d6ca1daa..e62600e26 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -90,18 +90,18 @@ mod tests; /// JWT algorithm used. The only supported algorithm is currently /// RS256. -#[derive(Deserialize, Debug)] +#[derive(Clone, Deserialize, Debug)] enum KeyAlgorithm { RS256 } /// Type of key contained in a JWT. The only supported key type is /// currently RSA. -#[derive(Deserialize, Debug)] +#[derive(Clone, Deserialize, Debug)] enum KeyType { RSA } /// Representation of a single JSON Web Key. See [RFC /// 7517](https://tools.ietf.org/html/rfc7517#section-4). #[allow(dead_code)] // kty & alg only constrain deserialisation, but aren't used -#[derive(Deserialize)] +#[derive(Clone, Debug, Deserialize)] pub struct JWK { kty: KeyType, alg: Option, @@ -116,7 +116,7 @@ pub struct JWK { /// Representation of a set of JSON Web Keys. See [RFC /// 7517](https://tools.ietf.org/html/rfc7517#section-5). -#[derive(Deserialize)] +#[derive(Clone, Debug, Deserialize)] pub struct JWKS { // This is a vector instead of some kind of map-like structure // because key IDs are in fact optional.