pub enum SigningKey {
RS256PublicKey(RS256PublicKey),
}Expand description
Enum that holds the public keys that will be used for the validation of the ID Token
Essentially a wrapper to connect the JWKsResponse struct with the jwt_simple crate
to use the verify_token function
Variants§
RS256PublicKey(RS256PublicKey)
A RSA Key of 256 bits
Implementations§
Source§impl SigningKey
impl SigningKey
A public key that can be used for the validation of the ID Token
Sourcepub fn verify_token(
&self,
token: &str,
options: VerificationOptions,
) -> Result<JWTClaims<NoCustomClaims>, Error>
pub fn verify_token( &self, token: &str, options: VerificationOptions, ) -> Result<JWTClaims<NoCustomClaims>, Error>
Function that calls the verify_token function of the jwt_simple crate for each key type
Trait Implementations§
Source§impl Clone for SigningKey
impl Clone for SigningKey
Source§fn clone(&self) -> SigningKey
fn clone(&self) -> SigningKey
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SigningKey
impl Debug for SigningKey
Source§impl From<JsonWebKey> for SigningKey
impl From<JsonWebKey> for SigningKey
Implementation of the From trait for the SigningKey enum to convert the JsonWebKey into
the SigningKey enum
Source§fn from(key: JsonWebKey) -> Self
fn from(key: JsonWebKey) -> Self
Function that converts the JsonWebKey into the SigningKey enum
Auto Trait Implementations§
impl Freeze for SigningKey
impl RefUnwindSafe for SigningKey
impl Send for SigningKey
impl Sync for SigningKey
impl Unpin for SigningKey
impl UnwindSafe for SigningKey
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