pub trait SessionVersionFetcher: Send + Sync {
// Required method
fn fetch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ppnum_id: &'life1 str,
bearer_token: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<i64, FetchError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Fresh-read source for the cache-miss path.
The SDK’s default implementation (HttpUserInfoFetcher) calls
/oauth/userinfo with the caller’s own bearer token. Consumers with
direct DB access (e.g., cross-schema SELECT in a monolith) can write
an adapter that bypasses HTTP.
bearer_token is the ACCESS TOKEN whose sv claim is being
validated — it’s always in hand at the validate call site, so
threading it through the trait avoids a second auth layer.