[][src]Struct picky::jose::jwk::Jwk

pub struct Jwk {
    pub key: JwkKeyType,
    pub alg: Option<Jwa>,
    pub key_use: Option<JwkPubKeyUse>,
    pub key_ops: Option<Vec<JwkKeyOps>>,
    pub kid: Option<String>,
    pub x5u: Option<String>,
    pub x5c: Option<Vec<String>>,
    pub x5t: Option<String>,
    pub x5t_s256: Option<String>,
}

Represents a cryptographic key as defined by RFC7517.

Fields

key: JwkKeyTypealg: Option<Jwa>

Identifies the algorithm intended for use with the key.

key_use: Option<JwkPubKeyUse>

Public Key Use

Intended use of the public key.

key_ops: Option<Vec<JwkKeyOps>>

Key Operations

identifies the operation(s) for which the key is intended to be used.

kid: Option<String>

Key ID Header

A hint indicating which key was used.

x5u: Option<String>

X.509 URL Header

URI that refers to a resource for an X.509 public key certificate or certificate chain.

x5c: Option<Vec<String>>

X.509 Certificate Chain

Chain of one or more PKIX certificates.

x5t: Option<String>

X.509 Certificate SHA-1 Thumbprint

base64url-encoded SHA-1 thumbprint (a.k.a. digest) of the DER encoding of an X.509 certificate.

x5t_s256: Option<String>

X.509 Certificate SHA-256 Thumbprint

base64url-encoded SHA-256 thumbprint (a.k.a. digest) of the DER encoding of an X.509 certificate.

Implementations

impl Jwk[src]

pub fn new(key: JwkKeyType) -> Self[src]

pub fn from_json(json: &str) -> Result<Self, JwkError>[src]

pub fn from_public_key(public_key: &PublicKey) -> Result<Self, JwkError>[src]

pub fn to_json(&self) -> Result<String, JwkError>[src]

pub fn to_json_pretty(&self) -> Result<String, JwkError>[src]

pub fn to_public_key(&self) -> Result<PublicKey, JwkError>[src]

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 Hash for Jwk[src]

impl PartialEq<Jwk> for Jwk[src]

impl Serialize for Jwk[src]

impl StructuralEq for Jwk[src]

impl StructuralPartialEq for Jwk[src]

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> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,