pub struct JWK {
pub kty: String,
pub use_: Option<String>,
pub kid: String,
pub alg: Option<String>,
pub n: String,
pub e: String,
pub x5c: Option<Vec<String>>,
pub x5t: Option<String>,
pub x5t_s256: Option<String>,
}
Expand description
Represents a JSON Web Key (JWK) used for token validation.
A JWK is a digital secure key used in secure web communications. It contains all the important details about the key, such as what it’s for and how it works. This information helps websites verify users.
Fields§
§kty: String
Key type (e.g., “RSA”)
use_: Option<String>
Intended use of the key (e.g., “sig” for signature)
kid: String
Unique identifier for the key
alg: Option<String>
Algorithm used with this key (e.g., “RS256”)
n: String
RSA public key modulus (base64url-encoded)
e: String
RSA public key exponent (base64url-encoded)
x5c: Option<Vec<String>>
X.509 certificate chain (optional)
x5t: Option<String>
X.509 certificate SHA-1 thumbprint (optional)
x5t_s256: Option<String>
X.509 certificate SHA-256 thumbprint (optional)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JWK
impl<'de> Deserialize<'de> for JWK
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for JWK
impl RefUnwindSafe for JWK
impl Send for JWK
impl Sync for JWK
impl Unpin for JWK
impl UnwindSafe for JWK
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
Mutably borrows from an owned value. Read more