pub trait ControlServiceAPIHandler: Send + Sync {
// Required method
fn authorize_targets(
&self,
client_ip: IpAddr,
request: AuthorizeTargetsRequest,
now: SystemTime,
) -> Result<AuthorizeTargetsResponse, AuthorizeTargetsError>;
}Expand description
Serves the requests of the anapaya.wap.v1.WapControl service.
Implemented by the WAP control plane and served by
nest_crpc_api.
Required Methods§
Authorizes client_ip for the targets and segments of request, as of now.
client_ip is the address the request arrived from, not one the request itself names, so a
client cannot ask for a grant on somebody else’s address.
Grants are additive and are never shortened, so a client refreshes its authorization by
calling this again before the returned expiry, see
GrantManager::authorize.
Returned error carries an HTTP status code and a human-readable message.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".