Cotal TypeScript packages
    Preparing search index...

    Function authorizeConnectCredential

    • The connect-time deny-new check (SPEC 13.1). Assumes the caller (the ledger connect authorizer) has ALREADY run the actor-row + scope + lifecycle-equality checks; this adds the credential-row liveness proof. THROWS to deny; returns on allow. Fail-closed throughout: absent/revoked/expired/ mismatched rows and every read failure deny.

      1. the bearer MUST carry act.credentialId (grammar-valid from validateUserToken). Claimless => deny (deny-new needs the claim; a pre-R1 bearer re-exchanges). A view bearer is NOT exempt; a bearer merely lacking act.view is a normal agent connect and is fine.
      2. leader-read cred.<lifecycleUid>.<credid>; require it exist, be active, be unexpired under the service clock, and bind holderPrincipal <owner>.<actor> + lifecycleUid + credentialId with NO normalization slack.
      3. root-issued credential (sourceChain === ["root"]): ALSO leader-read the lifecycle head and require it active with currentCredentialId === credid, so a SUPERSEDED root issuance is denied even if its old row still reads active (release-last keeps these consistent; head equality is the belt). A descendant (session/handle) leaf row is sufficient here: revoking an ancestor revokes the whole cred.<uid>.> family / bysrc chain and verified-evicts before the operation reports success, and after the leaf CAS deny-new holds.

      Parameters

      Returns Promise<void>