Skip to main content

Function: verifyRlt()

function verifyRlt(token, ctx): VerifyResult;

Defined in: verify.ts:83

Verify a compact-JWS Rasd License Token. Steps and reasons per §4.1:

  1. Bounds & shape (length ≤ 4096, exactly three non-empty base64url segments, decodable JSON) ⇒ MALFORMED.
  2. Header: alg === "EdDSA", typ === "RLT", kid string ≤ 32 chars — any other alg (including none, HS256) or a wrong typWRONG_TYP.
  3. Key lookup: kid unknown ⇒ UNKNOWN_KID; kid revoked ⇒ REVOKED.
  4. Ed25519 signature over the ASCII bytes of header.payloadBAD_SIGNATURE.
  5. Claims schema ⇒ SCHEMA; iss !== "rasd"ISSUER.
  6. nbf > now + 300 sNOT_YET_VALID (exp/grace are NOT validity conditions here — they drive the state machine, §5).
  7. App binding against apps[]APP_MISMATCH (apps: [] matches everything; a node host is never evaluated).
  8. { ok: true, claims, kid }.

Parameters

ParameterType
tokenstring
ctxVerifyContext

Returns

VerifyResult