/// Validates the `request` and that the sender is authorized to send
/// a message to the receiving canister.
///
/// See notes on request validity in the crate docs.
Validates the `request` and that the sender is authorized to send
a message to the receiving canister.

See notes on request validity in the crate docs.
Validates the ` request ` and that the sender is authorized to send a message to the receiving canister . See notes on request validity in the crate docs .
pub fn validate_request<C: HttpRequestContent + HasCanisterId>(
    request: &HttpRequest<C>,
    ingress_signature_verifier: &dyn IngressSigVerifier,
    current_time: Time,
    registry_version: RegistryVersion,
    malicious_flags: &MaliciousFlags,
) -> Result<(), RequestValidationError> {
    #[cfg(feature = "malicious_code")]
    {
        if malicious_flags.maliciously_disable_ingress_validation {
            return Ok(());
        }
    }
    get_authorized_canisters(
        request,
        ingress_signature_verifier,
        current_time,
        registry_version,
        malicious_flags,
    )
    .and_then(|targets| {
        if targets.contains(&request.content().canister_id()) {
            Ok(())
        } else {
            Err(CanisterNotInDelegationTargets(
                request.content().canister_id(),
            ))
        }
    })
}
pub fn validate_request < C : HttpRequestContent + HasCanisterId > ( request : & HttpRequest < C > , ingress_signature_verifier : & dyn IngressSigVerifier , current_time : Time , registry_version : RegistryVersion , malicious_flags : & MaliciousFlags , ) -> Result < ( ) , RequestValidationError > { # [ cfg ( feature " " ) ] { if malicious_flags . maliciously_disable_ingress_validation { return Ok ( ( ) ) ; } } get_authorized_canisters ( request , ingress_signature_verifier , current_time , registry_version , malicious_flags , ) . and_then ( | targets | { if targets . contains ( & request . content ( ) . canister_id ( ) ) { Ok ( ( ) ) } else { Err ( CanisterNotInDelegationTargets ( request . content ( ) . canister_id ( ) , ) ) } } ) }
Validates the `request` and that the sender is authorized to send
a message to the receiving canister.
Validates the ` request ` and that the sender is authorized to send a message to the receiving canister .
request
&HttpRequest<C>
ingress_signature_verifier
&dyn IngressSigVerifier
current_time
Time
registry_version
RegistryVersion
malicious_flags
&MaliciousFlags