Skip to main content

validate_request

Function validate_request 

Source
pub async fn validate_request(
    token: &str,
    bucket: &str,
    request: &HashMap<String, String>,
    callback: PyObject,
    takes_request: bool,
) -> Result<bool, String>
Expand description

Invoke the Python validator callback for a single request.

takes_request must be pre-computed once (e.g. at server startup via [callable_accepts_request]) and passed here to avoid re-running inspect.signature on every cache miss.