Skip to main content

evaluate_refresh

Function evaluate_refresh 

Source
pub fn evaluate_refresh<V: UcanVerifier + ?Sized>(
    grant: &Ucan,
    verifier: &V,
    now: u64,
    request: &GrantRequest,
    subject: Option<&SecurityContext>,
    sender_bound: bool,
) -> Result<GrantDecision, GrantError>
Expand description

Re-evaluate a grant on token refresh: the ZSP “access is re-evaluated on refresh” property.

Refresh is NOT a free re-mint. The presenter must re-present the grant (the ceiling may have been amended or revoked since the access token was minted), and the same evaluate_grant gates run again. This is a thin forwarder today — the name exists so the refresh path has an obvious, audited call site distinct from the initial mint, and so the deferred rotation logic has a home.

SECURITY: the refresh MUST supply a fresh DPoP proof (sender_bound from a new proof, not carried over) and the same now-threading rules apply.