pub trait AuthHandler: Send + Sync {
// Required method
fn authorize<'a>(
&'a self,
remote_id: EndpointId,
req: &'a HttpProxyRequest,
) -> impl Future<Output = Result<(), AuthError>> + Send + 'a;
}Expand description
Authorizes proxy requests from remote endpoints.
Implement this trait to control which requests are allowed through the upstream proxy. Authorization decisions can be based on the remote endpoint identity, request target, headers, or any other criteria.
Required Methods§
Checks if the request from remote_id should be authorized.
Returns Ok(()) to allow the request, or an AuthError to reject it.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.