pub struct TokenMetadata { /* private fields */ }
Expand description

JWT token information useful before signature/tag verification

Implementations§

The JWT algorithm for this token (“alg”) This information should not be trusted: it is unprotected and can be freely modified by a third party. Clients should ignore it and use the correct type of key directly.

The content type for this token (“cty”)

The key, or public key identifier for this token (“kid”)

The signature type for this token (“typ”)

The set of raw critical properties for this token (“crit”)

The certificate chain for this token (“x5c”) This information should not be trusted: it is unprotected and can be freely modified by a third party.

The key set URL for this token (“jku”) This information should not be trusted: it is unprotected and can be freely modified by a third party. At the bare minimum, you should check that the URL belongs to the domain you expect.

The public key for this token (“jwk”) This information should not be trusted: it is unprotected and can be freely modified by a third party. At the bare minimum, you should check that it’s in a set of public keys you already trust.

The certificate URL for this token (“x5u”) This information should not be trusted: it is unprotected and can be freely modified by a third party. At the bare minimum, you should check that the URL belongs to the domain you expect.

URLsafe-base64-encoded SHA1 hash of the X.509 certificate for this token (“x5t”) In practice, it can also be any string representing the public key. This information should not be trusted: it is unprotected and can be freely modified by a third party.

URLsafe-base64-encoded SHA256 hash of the X.509 certificate for this token (“x5t#256”) In practice, it can also be any string representing the public key. This information should not be trusted: it is unprotected and can be freely modified by a third party.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.