Struct jwt_simple::common::KeyMetadata
source · [−]pub struct KeyMetadata { /* private fields */ }Expand description
Unsigned metadata about a key to be attached to tokens. This information can be freely tampered with by an intermediate party. Most applications should not need to use this.
Implementations
sourceimpl KeyMetadata
impl KeyMetadata
sourcepub fn with_key_set_url(self, key_set_url: impl ToString) -> Self
pub fn with_key_set_url(self, key_set_url: impl ToString) -> Self
Add a key set URL to the metadata (“jku”)
sourcepub fn with_public_key(self, public_key: impl ToString) -> Self
pub fn with_public_key(self, public_key: impl ToString) -> Self
Add a public key to the metadata (“jwk”)
sourcepub fn with_certificate_url(self, certificate_url: impl ToString) -> Self
pub fn with_certificate_url(self, certificate_url: impl ToString) -> Self
Add a certificate URL to the metadata (“x5u”)
sourcepub fn with_certificate_sha1_thumbprint(
self,
certificate_sha1_thumbprint: impl ToString
) -> Result<Self, Error>
pub fn with_certificate_sha1_thumbprint(
self,
certificate_sha1_thumbprint: impl ToString
) -> Result<Self, Error>
Add a certificate SHA-1 thumbprint to the metadata (“x5t”)
sourcepub fn with_certificate_sha256_thumbprint(
self,
certificate_sha256_thumbprint: impl ToString
) -> Result<Self, Error>
pub fn with_certificate_sha256_thumbprint(
self,
certificate_sha256_thumbprint: impl ToString
) -> Result<Self, Error>
Add a certificate SHA-256 thumbprint to the metadata (“x5t#256”)
Trait Implementations
sourceimpl Clone for KeyMetadata
impl Clone for KeyMetadata
sourcefn clone(&self) -> KeyMetadata
fn clone(&self) -> KeyMetadata
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for KeyMetadata
impl Debug for KeyMetadata
sourceimpl Default for KeyMetadata
impl Default for KeyMetadata
sourcefn default() -> KeyMetadata
fn default() -> KeyMetadata
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for KeyMetadata
impl Send for KeyMetadata
impl Sync for KeyMetadata
impl Unpin for KeyMetadata
impl UnwindSafe for KeyMetadata
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more