Trait rjwt::Resolve[][src]

pub trait Resolve: Send + Sync {
    type Host: Serialize + DeserializeOwned + PartialEq + Send + Sync;
    type ActorId: Serialize + DeserializeOwned + PartialEq + Send + Sync;
    type Claims: Serialize + DeserializeOwned + Send + Sync;
    fn host(&self) -> Self::Host;
#[must_use] fn resolve<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        host: &'life1 Self::Host,
        actor_id: &'life2 Self::ActorId
    ) -> Pin<Box<dyn Future<Output = Result<Actor<Self::ActorId>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; #[must_use] fn consume_and_sign<'life0, 'life1, 'async_trait>(
        &'life0 self,
        actor: &'life1 Actor<Self::ActorId>,
        claims: Self::Claims,
        token: String,
        now: SystemTime
    ) -> Pin<Box<dyn Future<Output = Result<(String, Claims<Self::Host, Self::ActorId, Self::Claims>)>> + Send + 'async_trait>>
    where
        Self::ActorId: Clone,
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
fn validate<'a>(
        &'a self,
        encoded: &'a str,
        now: SystemTime
    ) -> Pin<Box<dyn Future<Output = Result<Claims<Self::Host, Self::ActorId, Self::Claims>>> + Send + 'a>> { ... } }

Trait which defines how to fetch the PublicKey given a host and actor ID.

Associated Types

Loading content...

Required methods

fn host(&self) -> Self::Host[src]

The identity of the signing host.

#[must_use]fn resolve<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    host: &'life1 Self::Host,
    actor_id: &'life2 Self::ActorId
) -> Pin<Box<dyn Future<Output = Result<Actor<Self::ActorId>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Given a host and actor ID, return a corresponding Actor.

Loading content...

Provided methods

#[must_use]fn consume_and_sign<'life0, 'life1, 'async_trait>(
    &'life0 self,
    actor: &'life1 Actor<Self::ActorId>,
    claims: Self::Claims,
    token: String,
    now: SystemTime
) -> Pin<Box<dyn Future<Output = Result<(String, Claims<Self::Host, Self::ActorId, Self::Claims>)>> + Send + 'async_trait>> where
    Self::ActorId: Clone,
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Validate the given encoded token and return a new signed token which inherits from it, as well as the Claims of the new token.

The expiration time of the new token is set equal to its parent.

fn validate<'a>(
    &'a self,
    encoded: &'a str,
    now: SystemTime
) -> Pin<Box<dyn Future<Output = Result<Claims<Self::Host, Self::ActorId, Self::Claims>>> + Send + 'a>>
[src]

Validate the given encoded token and return its Claims.

Loading content...

Implementors

Loading content...