Derive Hash for Header and Algorithm (#137)

This commit is contained in:
Craig Colegrove 2020-06-16 04:04:22 -06:00 committed by GitHub
parent cf6ac78714
commit 693a100128
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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
///