[][src]Struct aliri_jose::Jwt

#[repr(transparent)]pub struct 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]

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.

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 Borrow<JwtRef> for Jwt[src]

impl Clone for Jwt[src]

impl Debug for Jwt[src]

impl Deref for Jwt[src]

type Target = JwtRef

The resulting type after dereferencing.

impl<'de> Deserialize<'de> for Jwt[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]

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]

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.