about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2018-09-04T12·40+0200
committerVincent Ambo <mail@tazj.in>2018-09-04T12·40+0200
commit0c3cdee5ee8f0311a351e55208a6a5bfdf3bfcb8 (patch)
tree9a08bbc2ea6b77897fbe6099e8fe086a36f1b9e2
parent64a480ccb7133732b588e4024c980ccb729f638b (diff)
chore: Make JWKS type Cloneable
-rw-r--r--src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 2d6ca1daa97e..e62600e26b2f 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<KeyAlgorithm>,
@@ -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.