Struct salvo_extra::auth::jwt::DecodingKey [−][src]
All the different kind of keys we can use to decode a JWT This key can be re-used so make sure you only initialize it once if you can for better performance
Implementations
impl<'a> DecodingKey<'a>
[src]
pub fn from_secret(secret: &'a [u8]) -> DecodingKey<'a>
[src]
If you’re using HMAC, use this.
pub fn from_base64_secret(secret: &str) -> Result<DecodingKey<'a>, Error>
[src]
If you’re using HMAC with a base64 encoded, use this.
pub fn from_rsa_pem(key: &'a [u8]) -> Result<DecodingKey<'a>, Error>
[src]
If you are loading a public RSA key in a PEM format, use this.
pub fn from_rsa_components(
modulus: &'a str,
exponent: &'a str
) -> DecodingKey<'a>
[src]
modulus: &'a str,
exponent: &'a str
) -> DecodingKey<'a>
If you have (n, e) RSA public key components, use this.
pub fn from_ec_pem(key: &'a [u8]) -> Result<DecodingKey<'a>, Error>
[src]
If you have a ECDSA public key in PEM format, use this.
pub fn from_rsa_der(der: &'a [u8]) -> DecodingKey<'a>
[src]
If you know what you’re doing and have a RSA DER encoded public key, use this.
pub fn from_ec_der(der: &'a [u8]) -> DecodingKey<'a>
[src]
If you know what you’re doing and have a RSA EC encoded public key, use this.
pub fn into_static(self) -> DecodingKey<'static>
[src]
Convert self to DecodingKey<'static>
.
Trait Implementations
impl<'a> Clone for DecodingKey<'a>
[src]
pub fn clone(&self) -> DecodingKey<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for DecodingKey<'a>
[src]
impl<'a> PartialEq<DecodingKey<'a>> for DecodingKey<'a>
[src]
pub fn eq(&self, other: &DecodingKey<'a>) -> bool
[src]
pub fn ne(&self, other: &DecodingKey<'a>) -> bool
[src]
impl<'a> StructuralPartialEq for DecodingKey<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for DecodingKey<'a>
impl<'a> Send for DecodingKey<'a>
impl<'a> Sync for DecodingKey<'a>
impl<'a> Unpin for DecodingKey<'a>
impl<'a> UnwindSafe for DecodingKey<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,