Struct jsonwebtoken::Header
source · [−]pub struct Header {
pub typ: Option<String>,
pub alg: Algorithm,
pub cty: Option<String>,
pub jku: Option<String>,
pub kid: Option<String>,
pub x5u: Option<String>,
pub x5t: Option<String>,
}
Expand description
A basic JWT header, the alg defaults to HS256 and typ is automatically
set to JWT
. All the other fields are optional.
Fields
typ: Option<String>
The type of JWS: it can only be “JWT” here
Defined in RFC7515#4.1.9.
alg: Algorithm
The algorithm used
Defined in RFC7515#4.1.1.
cty: Option<String>
Content type
Defined in RFC7519#5.2.
jku: Option<String>
JSON Key URL
Defined in RFC7515#4.1.2.
kid: Option<String>
Key ID
Defined in RFC7515#4.1.4.
x5u: Option<String>
X.509 URL
Defined in RFC7515#4.1.5.
x5t: Option<String>
X.509 certificate thumbprint
Defined in RFC7515#4.1.7.
Implementations
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Header
impl<'de> Deserialize<'de> for Header
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Hash for Header
impl Hash for Header
sourcefn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [
Hasher
]. Read more1.3.0fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
Feeds a slice of this type into the given [
Hasher
]. Read moreimpl StructuralPartialEq for Header
Auto Trait Implementations
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more