Skip to main content

parse_jwt

Function parse_jwt 

Source
pub fn parse_jwt(token: &str) -> Result<UcanPayload, UcanParseError>
Expand description

Decode a JWT compact-form UCAN-lite token into its payload.

Returns the UcanPayload on structural success. The header is discarded after validation (the caller never needs alg etc. once the parser has accepted it). Signature bytes are also discarded by this entry point; Phase B.2’s verifier takes the raw token and re-splits to obtain the signed bytes.

§Errors

UcanParseError — every variant maps to wire code ERR_UCAN_INVALID = 1010. Always retryable: false.

§Out of scope

  • Signature verification (Phase B.2)
  • Chain attenuation, audience pinning, expiry, depth limit (Phase B.2)
  • Revocation store consultation (Phase B.2)