pub trait CredentialResolver:
Send
+ Sync
+ 'static {
// Required method
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
headers: &'life1 HeaderMap,
) -> Pin<Box<dyn Future<Output = Result<ResolvedCredential, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Resolve an incoming request to a Brain credential.
The default is BearerResolver. The hosted gateway supplies an
implementation that looks an API key up in its key store and returns the
tenant’s Brain credential (and, later, a per-request identity).
Required Methods§
Sourcefn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
headers: &'life1 HeaderMap,
) -> Pin<Box<dyn Future<Output = Result<ResolvedCredential, ApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
headers: &'life1 HeaderMap,
) -> Pin<Box<dyn Future<Output = Result<ResolvedCredential, ApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Map request headers to a ResolvedCredential, or a 401/403 error.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".