Struct keygate_jwt::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_sha256_thumbprint(
self,
certificate_sha256_thumbprint: impl ToString
) -> Result<Self, JWTError>
pub fn with_certificate_sha256_thumbprint(
self,
certificate_sha256_thumbprint: impl ToString
) -> Result<Self, JWTError>
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 moresourceimpl 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 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
Mutably borrows from an owned value. Read more