Skip to main content

verify_approval_any

Function verify_approval_any 

Source
pub fn verify_approval_any(
    public_hex: &str,
    signed: &SignedApproval,
    node_id: &str,
    target: &str,
    sha256: &str,
    now_secs: i64,
) -> Result<Verified, String>
Expand description

Checks a version 1 or version 2 approval the way a node does before it writes. public_hex is the key the caller trusts for this decision: a node passes the human/device key for a target that needs a person and the automation key for a rule approval, so a token signed by the wrong kind of key fails here before its claims are read.