Struct picky::jose::jwk::Jwk [−][src]
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>, }
Expand description
Represents a cryptographic key as defined by RFC7517.
Fields
key: JwkKeyType
alg: 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]
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<'de> Deserialize<'de> for Jwk
[src]
impl<'de> Deserialize<'de> for Jwk
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl Eq 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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,