Skip to content
Permalink
Browse files
Reorder header fields
For matching the order used in earlier versions

Signed-off-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
  • Loading branch information
orhun committed Apr 20, 2022
1 parent b8c4b78 commit c6d2fb9cc635ee0beafdeaebdac68c5d9e0d7c23
Showing 1 changed file with 4 additions and 4 deletions.
@@ -30,14 +30,14 @@ pub trait JoseHeader {
/// defined fields for common fields.
#[derive(Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Header {
#[serde(rename = "alg")]
pub algorithm: AlgorithmType,
#[serde(rename = "typ")]
pub type_: Option<HeaderType>,

#[serde(rename = "kid")]
pub key_id: Option<String>,

#[serde(rename = "typ")]
pub type_: Option<HeaderType>,
#[serde(rename = "alg")]
pub algorithm: AlgorithmType,

#[serde(rename = "cty", skip_serializing_if = "Option::is_none")]
pub content_type: Option<HeaderContentType>,

0 comments on commit c6d2fb9

Please sign in to comment.