Trait rjwt::Resolve [−][src]
Trait which defines how to fetch the PublicKey
given a host and actor ID.
Associated Types
type Host: Serialize + DeserializeOwned + PartialEq + Send + Sync
[src]
type ActorId: Serialize + DeserializeOwned + PartialEq + Send + Sync
[src]
type Claims: Serialize + DeserializeOwned + Send + Sync
[src]
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]
&'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,
Given a host and actor ID, return a corresponding Actor
.
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]
&'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,
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]
&'a self,
encoded: &'a str,
now: SystemTime
) -> Pin<Box<dyn Future<Output = Result<Claims<Self::Host, Self::ActorId, Self::Claims>>> + Send + 'a>>
Validate the given encoded token and return its Claims
.