pub trait ClientAuthorizer:
Send
+ Sync
+ 'static {
// Required method
fn authorize(
&self,
request: &LinkAttempt,
) -> Result<AccessPolicy, RejectReason>;
}Expand description
Decision boundary for accepting / rejecting a new client link.
The reflector calls Self::authorize once per inbound LINK
attempt. Returning Ok(AccessPolicy) admits the client with the
given access; returning Err(RejectReason) rejects the link and
causes the reflector to send the protocol-appropriate NAK.
Required Methods§
Called when a new client attempts to link.
§Errors
Returns a RejectReason describing why the link was
refused. The reflector converts that reason into the correct
wire-level NAK for the client’s protocol.