pub struct VerifyingKey { /* private fields */ }Expand description
A public key that verifies tokens
Implementations§
Source§impl VerifyingKey
impl VerifyingKey
Sourcepub fn es256_point(point: &[u8]) -> Result<Self>
pub fn es256_point(point: &[u8]) -> Result<Self>
ES256 key from an uncompressed P-256 point (0x04 || x || y, 65 bytes)
Sourcepub fn from_jwk(jwk: &Value) -> Result<Self>
pub fn from_jwk(jwk: &Value) -> Result<Self>
Key from a JSON Web Key (kty RSA or EC with crv P-256)
Sourcepub fn with_kid(self, kid: impl Into<String>) -> Self
pub fn with_kid(self, kid: impl Into<String>) -> Self
Set the key id matched against the token’s kid header
pub fn algorithm(&self) -> Algorithm
pub fn kid(&self) -> Option<&str>
Trait Implementations§
Source§impl Clone for VerifyingKey
impl Clone for VerifyingKey
Auto Trait Implementations§
impl Freeze for VerifyingKey
impl RefUnwindSafe for VerifyingKey
impl Send for VerifyingKey
impl Sync for VerifyingKey
impl Unpin for VerifyingKey
impl UnsafeUnpin for VerifyingKey
impl UnwindSafe for VerifyingKey
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