pub trait WidgetAuthProvider: Send + Sync {
// Required method
fn agent_widget_auth<'life0, 'life1, 'async_trait>(
&'life0 self,
agent_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<AgentWidgetAuth>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Hook for resolving an agent’s AgentWidgetAuth policy.
Implemented by the host application (commonly backed by its agent DB/API).
Returning None means “no policy for this agent” — the server treats that as
allow in permissive mode, or deny in strict mode (WIDGET_AUTH_STRICT).
Required Methods§
Sourcefn agent_widget_auth<'life0, 'life1, 'async_trait>(
&'life0 self,
agent_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<AgentWidgetAuth>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn agent_widget_auth<'life0, 'life1, 'async_trait>(
&'life0 self,
agent_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<AgentWidgetAuth>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The embed-auth policy for agent_id, or None if the agent has none /
is unknown.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".