[−][src]Struct jwt::legacy::Token
Deprecated:
Please use jwt::Token instead
Fields
header: H
Deprecated:
Please use jwt::Token instead
claims: C
Deprecated:
Please use jwt::Token instead
Methods
impl<H, C> Token<H, C> where
H: Component,
C: Component,
[src]
H: Component,
C: Component,
pub fn new(header: H, claims: C) -> Token<H, C>
[src]
pub fn parse(raw: &str) -> Result<Token<H, C>, Error>
[src]
Parse a token from a string.
pub fn verify<D>(&self, key: &[u8], _digest: D) -> bool where
D: Input + BlockInput + FixedOutput + Reset + Default + Clone + TypeLevelAlgorithmType,
D::BlockSize: ArrayLength<u8>,
D::OutputSize: ArrayLength<u8>,
[src]
D: Input + BlockInput + FixedOutput + Reset + Default + Clone + TypeLevelAlgorithmType,
D::BlockSize: ArrayLength<u8>,
D::OutputSize: ArrayLength<u8>,
Verify a from_base64d token with a key and a given hashing algorithm. Make sure to check the token's algorithm before applying.
pub fn signed<D>(&self, key: &[u8], _digest: D) -> Result<String, Error> where
D: Input + BlockInput + FixedOutput + Reset + Default + Clone + TypeLevelAlgorithmType,
D::BlockSize: ArrayLength<u8>,
D::OutputSize: ArrayLength<u8>,
[src]
D: Input + BlockInput + FixedOutput + Reset + Default + Clone + TypeLevelAlgorithmType,
D::BlockSize: ArrayLength<u8>,
D::OutputSize: ArrayLength<u8>,
Generate the signed token from a key and a given hashing algorithm.
Trait Implementations
impl<H: Debug, C: Debug> Debug for Token<H, C> where
H: Component,
C: Component,
[src]
H: Component,
C: Component,
impl<H: Default, C: Default> Default for Token<H, C> where
H: Component,
C: Component,
[src]
H: Component,
C: Component,
impl<H, C> PartialEq<Token<H, C>> for Token<H, C> where
H: Component + PartialEq,
C: Component + PartialEq,
[src]
H: Component + PartialEq,
C: Component + PartialEq,
Auto Trait Implementations
impl<H, C> RefUnwindSafe for Token<H, C> where
C: RefUnwindSafe,
H: RefUnwindSafe,
C: RefUnwindSafe,
H: RefUnwindSafe,
impl<H, C> Send for Token<H, C> where
C: Send,
H: Send,
C: Send,
H: Send,
impl<H, C> Sync for Token<H, C> where
C: Sync,
H: Sync,
C: Sync,
H: Sync,
impl<H, C> Unpin for Token<H, C> where
C: Unpin,
H: Unpin,
C: Unpin,
H: Unpin,
impl<H, C> UnwindSafe for Token<H, C> where
C: UnwindSafe,
H: UnwindSafe,
C: UnwindSafe,
H: UnwindSafe,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
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>,