Struct graph_core::identity::JsonWebKey
source · pub struct JsonWebKey {
pub kty: String,
pub _use: Option<String>,
pub key_ops: Vec<String>,
pub alg: Option<String>,
pub kid: Option<String>,
pub x5u: Option<Url>,
pub x5c: Option<String>,
pub x5t: Option<String>,
pub x5t_s256: Option<String>,
pub additional_fields: HashMap<String, Value>,
}
Expand description
JSON Web Key (JWK) is a JSON object that represents a cryptographic key. The members of the object represent properties of the key, including its value. RFC 7517
Fields§
§kty: String
The “kty” (key type) parameter identifies the cryptographic algorithm family used with the key, such as “RSA” or “EC”. “kty” values should either be registered in the IANA “JSON Web Key Types” registry established by [JWA] or be a value that contains a Collision-Resistant Name. The “kty” value is a case-sensitive string. This member MUST be present in a JWK. RFC 7517
_use: Option<String>
The “use” (public key use) parameter identifies the intended use of the public key. The “use” parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. RFC 7517
key_ops: Vec<String>
The “key_ops” (key operations) parameter identifies the operation(s) for which the key is intended to be used. The “key_ops” parameter is intended for use cases in which public, private, or symmetric keys may be present. RFC 7517
alg: Option<String>
The “alg” (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA “JSON Web Signature and Encryption Algorithms” registry established by JWA or be a value that contains a Collision-Resistant Name. The “alg” value is a case-sensitive ASCII string. Use of this member is OPTIONAL. RFC 7517
kid: Option<String>
The “kid” (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the “kid” value is unspecified. When “kid” values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct “kid” values. (One example in which different keys might use the same “kid” value is if they have different “kty” (key type) values but are considered to be equivalent alternatives by the application using them.) The “kid” value is a case-sensitive string. Use of this member is OPTIONAL. When used with JWS or JWE, the “kid” value is used to match a JWS or JWE “kid” Header Parameter value. RFC 7517
x5u: Option<Url>
The “x5u” (X.509 URL) parameter is a URI that refers to a resource for an X.509 public key certificate or certificate chain RFC 7517
x5c: Option<String>
The “x5c” (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates RFC5280. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of RFC4648 – not base64url-encoded) DER ITU.X690.1994 PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate. This MAY be followed by additional certificates, with each subsequent certificate being the one used to certify the previous one. The key in the first certificate MUST match the public key represented by other members of the JWK. Use of this member is OPTIONAL. RFC 7517
x5t: Option<String>
The “x5t” (X.509 certificate SHA-1 thumbprint) parameter is a base64url-encoded SHA-1 thumbprint (a.k.a. digest) of the DER encoding of an X.509 certificate [RFC5280] Note that certificate thumbprints are also sometimes known as certificate fingerprints. The key in the certificate MUST match the public key represented by other members of the JWK. Use of this member is OPTIONAL RFC 7517
x5t_s256: Option<String>
The “x5t#S256” (X.509 certificate SHA-256 thumbprint) parameter is a base64url-encoded SHA-256 thumbprint (a.k.a. digest) of the DER encoding of an X.509 certificate Note that certificate thumbprints are also sometimes known as certificate fingerprints. The key in the certificate MUST match the public key represented by other members of the JWK. Use of this member is OPTIONAL. RFC 7517
additional_fields: HashMap<String, Value>
Trait Implementations§
source§impl Clone for JsonWebKey
impl Clone for JsonWebKey
source§fn clone(&self) -> JsonWebKey
fn clone(&self) -> JsonWebKey
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for JsonWebKey
impl Debug for JsonWebKey
source§impl<'de> Deserialize<'de> for JsonWebKey
impl<'de> Deserialize<'de> for JsonWebKey
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Display for JsonWebKey
impl Display for JsonWebKey
source§impl Hash for JsonWebKey
impl Hash for JsonWebKey
source§impl PartialEq for JsonWebKey
impl PartialEq for JsonWebKey
source§fn eq(&self, other: &JsonWebKey) -> bool
fn eq(&self, other: &JsonWebKey) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for JsonWebKey
impl Serialize for JsonWebKey
impl Eq for JsonWebKey
impl StructuralPartialEq for JsonWebKey
Auto Trait Implementations§
impl Freeze for JsonWebKey
impl RefUnwindSafe for JsonWebKey
impl Send for JsonWebKey
impl Sync for JsonWebKey
impl Unpin for JsonWebKey
impl UnwindSafe for JsonWebKey
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.