pub trait ServiceTokenMinter:
Send
+ Sync
+ 'static {
// Required method
fn mint<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AuthCtx, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}Expand description
Mints an AuthCtx representing this service (no user). Used by
background jobs and queue consumers.
Default: default::HttpServiceTokenMinter POSTs to a configured
auth-service endpoint.
Required Methods§
fn mint<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AuthCtx, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".