pub trait RequestAuthorizer: Send + Sync {
// Required method
fn authorize(
&self,
params: &ServiceParams,
task_id: Option<&str>,
) -> Result<(), A2AError>;
}Expand description
Decides whether a request may proceed.
The handler never treats a non-empty header as a principal. An
implementation must validate whatever credential it accepts (token, DID,
session) and return A2AError when that check fails. task_id is set
when the method addresses one task and is reserved for owner checks.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".