Struct biscuit::jws::RegisteredHeader
source · pub struct RegisteredHeader {
pub algorithm: SignatureAlgorithm,
pub media_type: Option<String>,
pub content_type: Option<String>,
pub web_key_url: Option<String>,
pub web_key: Option<String>,
pub key_id: Option<String>,
pub x509_url: Option<String>,
pub x509_chain: Option<Vec<String>>,
pub x509_fingerprint: Option<String>,
pub critical: Option<Vec<String>>,
}
Expand description
Registered JWS header fields.
The alg defaults to HS256 and typ is automatically
set to JWT
. All the other fields are optional.
The fields are defined by RFC7519#5 and additionally in
RFC7515#4.1.
Fields
algorithm: SignatureAlgorithm
Algorithms, as defined in RFC 7518, used to sign or encrypt the JWT
Serialized to alg
.
Defined in RFC7515#4.1.1.
media_type: Option<String>
Media type of the complete JWS. Serialized to typ
.
Defined in RFC7519#5.1 and additionally
RFC7515#4.1.9.
The “typ” value “JOSE” can be used by applications to indicate that
this object is a JWS or JWE using the JWS Compact Serialization or
the JWE Compact Serialization. The “typ” value “JOSE+JSON” can be
used by applications to indicate that this object is a JWS or JWE
using the JWS JSON Serialization or the JWE JSON Serialization.
Other type values can also be used by applications.
content_type: Option<String>
Content Type of the secured payload.
Typically used to indicate the presence of a nested JOSE object which is signed or encrypted.
Serialized to cty
.
Defined in RFC7519#5.2 and additionally
RFC7515#4.1.10.
web_key_url: Option<String>
The JSON Web Key Set URL. This is currently not implemented (correctly).
Serialized to jku
.
Defined in RFC7515#4.1.2.
web_key: Option<String>
The JSON Web Key. This is currently not implemented (correctly).
Serialized to jwk
.
Defined in RFC7515#4.1.3.
key_id: Option<String>
The Key ID. This is currently not implemented (correctly).
Serialized to kid
.
Defined in RFC7515#4.1.3.
x509_url: Option<String>
X.509 Public key cerfificate URL. This is currently not implemented (correctly).
Serialized to x5u
.
Defined in RFC7515#4.1.5.
x509_chain: Option<Vec<String>>
X.509 public key certificate chain. This is currently not implemented (correctly).
Serialized to x5c
.
Defined in RFC7515#4.1.6.
x509_fingerprint: Option<String>
X.509 Certificate thumbprint. This is currently not implemented (correctly).
Also not implemented, is the SHA-256 thumbprint variant of this header.
Serialized to x5t
.
Defined in RFC7515#4.1.7.
critical: Option<Vec<String>>
List of critical extended headers.
This is currently not implemented (correctly).
Serialized to crit
.
Defined in RFC7515#4.1.11.
Trait Implementations
sourceimpl Clone for RegisteredHeader
impl Clone for RegisteredHeader
sourcefn clone(&self) -> RegisteredHeader
fn clone(&self) -> RegisteredHeader
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for RegisteredHeader
impl Debug for RegisteredHeader
sourceimpl Default for RegisteredHeader
impl Default for RegisteredHeader
sourcefn default() -> RegisteredHeader
fn default() -> RegisteredHeader
sourceimpl<'de> Deserialize<'de> for RegisteredHeader
impl<'de> Deserialize<'de> for RegisteredHeader
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>,
sourceimpl From<RegisteredHeader> for Header<Empty>
impl From<RegisteredHeader> for Header<Empty>
sourcefn from(registered: RegisteredHeader) -> Self
fn from(registered: RegisteredHeader) -> Self
sourceimpl PartialEq<RegisteredHeader> for RegisteredHeader
impl PartialEq<RegisteredHeader> for RegisteredHeader
sourcefn eq(&self, other: &RegisteredHeader) -> bool
fn eq(&self, other: &RegisteredHeader) -> bool
sourceimpl Serialize for RegisteredHeader
impl Serialize for RegisteredHeader
impl Eq for RegisteredHeader
impl StructuralEq for RegisteredHeader
impl StructuralPartialEq for RegisteredHeader
Auto Trait Implementations
impl RefUnwindSafe for RegisteredHeader
impl Send for RegisteredHeader
impl Sync for RegisteredHeader
impl Unpin for RegisteredHeader
impl UnwindSafe for RegisteredHeader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.