[][src]Struct picky::jose::jwt::Jwt

pub struct Jwt<'a, C> { /* fields omitted */ }

Methods

impl<'a, C> Jwt<'a, C>[src]

pub fn new(hashtype: SignatureHashType, claims: C) -> Self[src]

pub fn view_claims(&self) -> &C[src]

pub fn into_claims(self) -> C[src]

pub fn check_signature(
    &self,
    encoded_token: &str,
    public_key: &PublicKey
) -> Result<(), JwtError>
[src]

impl<'a, C: Serialize> Jwt<'a, C>[src]

pub fn encode(&self, private_key: &PrivateKey) -> Result<String, JwtError>[src]

impl<'a, C: DeserializeOwned> Jwt<'a, C>[src]

pub fn decode(
    encoded_token: &str,
    validator: &JwtValidator
) -> Result<Self, JwtError>
[src]

Validate using validator and returns decoded JWT.

pub fn decode_without_validation(encoded_token: &str) -> Result<Self, JwtError>[src]

Unsafe JWT decoding method. Signature isn't checked at all.

Auto Trait Implementations

impl<'a, C> RefUnwindSafe for Jwt<'a, C> where
    C: RefUnwindSafe

impl<'a, C> Send for Jwt<'a, C> where
    C: Send

impl<'a, C> Sync for Jwt<'a, C> where
    C: Sync

impl<'a, C> Unpin for Jwt<'a, C> where
    C: Unpin

impl<'a, C> UnwindSafe for Jwt<'a, C> where
    C: UnwindSafe

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> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,