[−][src]Struct aliri_jose::Jwt
A JSON Web Token
Implementations
impl Jwt
[src]
pub fn new<T: Into<String>>(raw: T) -> Self
[src]
Strongly types the given String
.
pub fn into_inner(self) -> String
[src]
Unwraps the underlying value.
pub fn as_str(&self) -> &str
[src]
Provides access to the underlying value as a string slice.
Methods from Deref<Target = JwtRef>
pub fn decompose<H>(&self) -> Result<Decomposed<H>, JwtVerifyError> where
H: for<'de> Deserialize<'de>,
[src]
H: for<'de> Deserialize<'de>,
Decomposes the JWT into its parts, preparing it for later processing.
pub fn verify<C, H, V>(
&self,
key: &V,
validator: &CoreValidator
) -> Result<Validated<C, H>, JwtVerifyError> where
C: for<'de> Deserialize<'de>,
H: for<'de> Deserialize<'de>,
V: Verifier<Algorithm = Algorithm>,
JwtVerifyError: From<V::Error>,
[src]
&self,
key: &V,
validator: &CoreValidator
) -> Result<Validated<C, H>, JwtVerifyError> where
C: for<'de> Deserialize<'de>,
H: for<'de> Deserialize<'de>,
V: Verifier<Algorithm = Algorithm>,
JwtVerifyError: From<V::Error>,
Verifies a token against a particular JWK and validation plan
If you need to inspect the token first to determine how to verify
the token, use decompose()
to peek into the JWT.
pub fn verify_with_custom<C, H, V, X>(
&self,
key: &V,
validator: &CoreValidator,
custom: X
) -> Result<Validated<C, H>, JwtVerifyError> where
C: for<'de> Deserialize<'de>,
H: for<'de> Deserialize<'de>,
V: Verifier<Algorithm = Algorithm>,
JwtVerifyError: From<V::Error>,
X: ClaimsValidator<C, H>,
[src]
&self,
key: &V,
validator: &CoreValidator,
custom: X
) -> Result<Validated<C, H>, JwtVerifyError> where
C: for<'de> Deserialize<'de>,
H: for<'de> Deserialize<'de>,
V: Verifier<Algorithm = Algorithm>,
JwtVerifyError: From<V::Error>,
X: ClaimsValidator<C, H>,
Verifies a token against a particular JWK and validation plan
If you need to inspect the token first to determine how to verify
the token, use decompose()
to peek into the JWT.
Trait Implementations
impl AsRef<JwtRef> for Jwt
[src]
impl Borrow<JwtRef> for Jwt
[src]
impl Clone for Jwt
[src]
impl Debug for Jwt
[src]
impl Deref for Jwt
[src]
impl<'de> Deserialize<'de> for Jwt
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
impl<'a> Display for Jwt
[src]
impl Eq for Jwt
[src]
impl<'_> From<&'_ JwtRef> for Jwt
[src]
impl<'_> From<&'_ str> for Jwt
[src]
impl From<Jwt> for String
[src]
impl From<String> for Jwt
[src]
impl Hash for Jwt
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Jwt> for Jwt
[src]
impl PartialEq<Jwt> for JwtRef
[src]
impl PartialEq<JwtRef> for Jwt
[src]
impl Serialize for Jwt
[src]
impl StructuralEq for Jwt
[src]
impl StructuralPartialEq for Jwt
[src]
Auto Trait Implementations
impl RefUnwindSafe for Jwt
impl Send for Jwt
impl Sync for Jwt
impl Unpin for Jwt
impl UnwindSafe for Jwt
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
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>,