pub trait BindingResolver: Send + Sync {
// Required method
fn resolve_binding<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 UserId,
device_id: &'life2 DeviceId,
now: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<DeviceBinding>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Where a rotation gets the DeviceBinding to mint its access token with.
The refresh record deliberately carries no binding (R018, guide by
omission), so whoever rotates must supply one. A fixed DeviceBinding is
itself a resolver — the caller that ran the ceremony already knows it. A
generic refresh door does not, and resolves it from the product’s own
per-device session rows (R730; cheers-axum’s refresh module adapts a
SessionDirectory).
Ok(None) means “no binding recorded for this device” and makes the
rotation refuse with RefreshError::Unbound before the token is spent.
Err is a store failure and surfaces as Error::Store.
Required Methods§
fn resolve_binding<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 UserId,
device_id: &'life2 DeviceId,
now: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<DeviceBinding>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".