Trait JwtDecoder

Source
pub trait JwtDecoder<T>
where T: for<'de> DeserializeOwned,
{ // Required method fn decode<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<TokenData<T>, Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; }
Expand description

A generic trait for decoding JWT tokens.

This trait is implemented for both LocalDecoder and RemoteJwksDecoder

Required Methods§

Source

fn decode<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<TokenData<T>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§

Source§

impl<T> JwtDecoder<T> for LocalDecoder
where T: for<'de> DeserializeOwned,

Source§

impl<T> JwtDecoder<T> for RemoteJwksDecoder
where T: for<'de> DeserializeOwned,