Expand description
Who a caller is, before anything is created for them.
One verifier, three shapes (Proof): a session this server issued, a
JWT signed by a key in the callerβs credential records, and an OpenID
Connect token (see this moduleβs oidc sibling). createAccount and
createSession both reach it through prove, naming the account the
credential is for (Named).
StructsΒ§
- KeyJwt π
- A key-signed JWT that checks out, not yet spent.
- Named π
- The account a request says its credential is for.
- Replay
- Proofs already spent, each until its own expiry.
EnumsΒ§
- NamedBy π
- Which field of a request names the account its credential is for.
- NotSpent
- Why a proof could not be spent.
- Proof
- What a credential on the treeβs routes resolved to.
ConstantsΒ§
- MAX_
NAMED_ πDID_ BYTES - The longest
didorparentthe lexicons allow. - MAX_
PROOF_ LIFETIME - The furthest into the future a proofβs
expmay sit.
FunctionsΒ§
- account_
keys π - The multibase keys
didβs credential records hold. - account_
mismatch π - A credential for one account, sent with a request naming another.
- check_
named π - Refuses a named account that is not a DID, before it reaches a comparison or a lookup.
- decode_
jwt π - A JWTβs header and claims, decoded but not verified.
- fetch_
json π GETof a small JSON body from a URL this server chose to reach.- invalid_
proof π - not_
the_ πoperator - Refuses a DID that is neither hosted here nor the operator this deployment was launched naming, before anything is fetched for it.
- prove π
- Resolves the
Authorizationheader on a tree route into what it proves. - prove_
by_ πkey - Verifies a JWT whose
issis a DID: signed by a key the DID logs in with, for this server, forlxm, unexpired and unspent. The DID must be hosted here, and its keys are its credential records. - segment π
- One segment of a compact JWS, decoded.
- spend π
- Spends a proof, naming why it could not be.
- split_
jwt π - A JWTβs three parts, split but not decoded.
- verify_
key_ πjwt - Checks a JWT whose
issisissagainstkeys: for this server, forlxm,expin the future and at mostMAX_PROOF_LIFETIMEaway, ajtiof a bounded length, and signed by one ofkeys. - verify_
with_ πkeys - Verifies
signing_inputβssignatureagainst every multibase key inkeyson the curvealgnames, answering the key that verified it.