Skip to main content

verify_headers

Function verify_headers 

Source
pub fn verify_headers(
    expected: Context<'_>,
    procedure: &str,
    expected_commitment: Option<&str>,
    now: i64,
    headers: &Headers,
) -> Result<Authorized, AuthError>
Expand description

Verify adapter headers against deployment-owned context and actual content. expected_commitment is required for unary operations; with None, an UploadPack handler may defer that comparison until the first header, before attributed effects. Same as verify_headers_with with ExpectedCommitment::Exact, or ExpectedCommitment::PackStream for None.

ยงErrors

Rejects legacy/missing versions, malformed fields, context/content mismatch, validity-window failures and invalid signatures.