Skip to content

Commit

Permalink
Add KB_JWT_HEADER_TYP (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulmth authored Dec 7, 2023
1 parent 30d7890 commit 468dc6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/key_binding_jwt_claims.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ pub struct KeyBindingJwtClaims {
}

impl KeyBindingJwtClaims {
pub const KB_JWT_HEADER_TYP: &'static str = " kb+jwt";

/// Creates a new [`KeyBindingJwtClaims`].
/// When `issued_at` is left as None, it will automatically default to the current time
///
Expand Down
4 changes: 3 additions & 1 deletion src/sd_jwt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ use std::fmt::Display;
use crate::Error;
use crate::Result;
use itertools::Itertools;
use serde::Deserialize;
use serde::Serialize;

/// Representation of an SD-JWT of the format
/// `<Issuer-signed JWT>~<Disclosure 1>~<Disclosure 2>~...~<Disclosure N>~<optional KB-JWT>`.
#[derive(Debug, Clone, Eq, PartialEq)]
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
pub struct SdJwt {
/// The JWT part.
pub jwt: String,
Expand Down

0 comments on commit 468dc6c

Please sign in to comment.