[][src]Struct aliri_jose::Jwk

pub struct Jwk { /* fields omitted */ }

An identified JSON Web Key

Implementations

impl Jwk[src]

pub fn key_id(&self) -> Option<&KeyIdRef>[src]

The key ID

pub fn usage(&self) -> Option<Usage>[src]

The intended usage of the key

pub fn algorithm(&self) -> Option<Algorithm>[src]

The algorithm to be used with this JWK

pub fn is_compatible(&self, alg: Algorithm) -> bool[src]

Whether the key is compatible with the given algorithm

pub fn with_key_id(self, kid: KeyId) -> Self[src]

Sets the key ID

pub fn with_usage(self, usage: Usage) -> Self[src]

Sets the key's usage

pub fn with_algorithm(self, alg: impl Into<Algorithm>) -> Self[src]

Sets the algorithm and usage consistent with that algorithm

pub fn public_only(self) -> Self[src]

Strips any private key components

Trait Implementations

impl Clone for Jwk[src]

impl Debug for Jwk[src]

impl<'de> Deserialize<'de> for Jwk[src]

impl Eq for Jwk[src]

impl From<Hmac> for Jwk[src]

impl From<PublicKey> for Jwk[src]

impl From<Rsa> for Jwk[src]

impl PartialEq<Jwk> for Jwk[src]

impl Serialize for Jwk[src]

impl StructuralEq for Jwk[src]

impl StructuralPartialEq for Jwk[src]

impl Verifier for Jwk[src]

type Algorithm = Algorithm

The verifiable signature algorithms

type Error = JwkVerifyError

The error returned on a failure to verify

Auto Trait Implementations

impl RefUnwindSafe for Jwk

impl Send for Jwk

impl Sync for Jwk

impl Unpin for Jwk

impl UnwindSafe for Jwk

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.