jwt_provider

Trait JwtHandler

Source
pub trait JwtHandler {
    // Required methods
    fn generate_jwt<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        ctx: &'life1 Context,
        arg: &'life2 User,
    ) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn validate_jwt<'life0, 'life1, 'life2, 'async_trait, TS>(
        &'life0 self,
        ctx: &'life1 Context,
        arg: &'life2 TS,
    ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
       where TS: 'async_trait + ToString + ?Sized + Sync,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn get_jwt_values<'life0, 'life1, 'life2, 'async_trait, TS>(
        &'life0 self,
        ctx: &'life1 Context,
        arg: &'life2 TS,
    ) -> Pin<Box<dyn Future<Output = RpcResult<ClaimMap>> + Send + 'async_trait>>
       where TS: 'async_trait + ToString + ?Sized + Sync,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn is_token_expired<'life0, 'life1, 'life2, 'async_trait, TS>(
        &'life0 self,
        ctx: &'life1 Context,
        arg: &'life2 TS,
    ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
       where TS: 'async_trait + ToString + ?Sized + Sync,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided method
    fn contract_id() -> &'static str { ... }
}
Expand description

The JwtHandler service has a single method, calculate, which calculates the factorial of its whole number parameter. wasmbus.contractId: michaelrademeyer:interfaces:jwt_handler wasmbus.providerReceive

Required Methods§

Source

fn generate_jwt<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 Context, arg: &'life2 User, ) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn validate_jwt<'life0, 'life1, 'life2, 'async_trait, TS>( &'life0 self, ctx: &'life1 Context, arg: &'life2 TS, ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
where TS: 'async_trait + ToString + ?Sized + Sync, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn get_jwt_values<'life0, 'life1, 'life2, 'async_trait, TS>( &'life0 self, ctx: &'life1 Context, arg: &'life2 TS, ) -> Pin<Box<dyn Future<Output = RpcResult<ClaimMap>> + Send + 'async_trait>>
where TS: 'async_trait + ToString + ?Sized + Sync, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn is_token_expired<'life0, 'life1, 'life2, 'async_trait, TS>( &'life0 self, ctx: &'life1 Context, arg: &'life2 TS, ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
where TS: 'async_trait + ToString + ?Sized + Sync, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Provided Methods§

Source

fn contract_id() -> &'static str

returns the capability contract id for this interface

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§