diff --git a/src/algorithms.rs b/src/algorithms.rs index 20edbf1..924a41e 100644 --- a/src/algorithms.rs +++ b/src/algorithms.rs @@ -10,7 +10,7 @@ pub(crate) enum AlgorithmFamily { } /// The algorithms supported for signing/verifying JWTs -#[derive(Debug, PartialEq, Copy, Clone, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Hash, Copy, Clone, Serialize, Deserialize)] pub enum Algorithm { /// HMAC using SHA-256 HS256, diff --git a/src/header.rs b/src/header.rs index c6ac473..ba4b685 100644 --- a/src/header.rs +++ b/src/header.rs @@ -6,7 +6,7 @@ use crate::serialization::b64_decode; /// A basic JWT header, the alg defaults to HS256 and typ is automatically /// set to `JWT`. All the other fields are optional. -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[derive(Debug, Clone, PartialEq, Hash, Serialize, Deserialize)] pub struct Header { /// The type of JWS: it can only be "JWT" here ///