pub trait SessionTransform<S: AuthSchema>: Send + Sync {
// Required method
fn transform<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: Value,
request: &'life1 AuthRequest,
context: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<Value>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Project an authenticated session response into application response data.
The input is the actual public session/user projection, including configured fields and deferred-refresh information. Transforming it does not change the stored principal or the authentication context used by subsequent plugins.
Required Methods§
Sourcefn transform<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: Value,
request: &'life1 AuthRequest,
context: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn transform<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: Value,
request: &'life1 AuthRequest,
context: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
§Errors
Return an intentional API error or an application callback failure.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".