[][src]Struct aliri_jose::JwtRef

#[repr(transparent)]pub struct JwtRef(_);

Reference to a JSON Web Token

Implementations

impl JwtRef[src]

pub fn decompose<H>(&self) -> Result<Decomposed<H>, JwtVerifyError> where
    H: for<'de> Deserialize<'de>, 
[src]

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]

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]

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.

impl JwtRef[src]

pub fn from_str(raw: &str) -> &Self[src]

Transparently reinterprets the string slice as a strongly-typed value.

pub const fn as_str(&self) -> &str[src]

Provides access to the underlying value as a string slice.

Trait Implementations

impl AsRef<JwtRef> for Jwt[src]

impl AsRef<JwtRef> for JwtRef[src]

impl Borrow<JwtRef> for Jwt[src]

impl Debug for JwtRef[src]

impl<'de: 'a, 'a> Deserialize<'de> for &'a JwtRef[src]

impl<'a> Display for &'a JwtRef[src]

impl Eq for JwtRef[src]

impl<'_> From<&'_ JwtRef> for Jwt[src]

impl Hash for JwtRef[src]

impl PartialEq<Jwt> for JwtRef[src]

impl PartialEq<JwtRef> for JwtRef[src]

impl PartialEq<JwtRef> for Jwt[src]

impl<'a> Serialize for &'a JwtRef[src]

impl StructuralEq for JwtRef[src]

impl StructuralPartialEq for JwtRef[src]

impl ToOwned for JwtRef[src]

type Owned = Jwt

The resulting type after obtaining ownership.

Auto Trait Implementations

impl RefUnwindSafe for JwtRef

impl Send for JwtRef

impl Sync for JwtRef

impl Unpin for JwtRef

impl UnwindSafe for JwtRef

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.