انتقل إلى المحتوى الرئيسي

Interface: ActorVerifier

Defined in: packages/messaging/src/ports.ts:134

Checks the signed actor token an envelope carries (chapter 30, a signed actor token; slice 2 D2.2). The receiver calls it on both adapters, before any scope is minted, and only for an envelope that carries a token; whether a token is required at all is the receiver's rule, not the verifier's, so a verifier cannot waive it.

The estate's implementation is ActorTokenVerifier (@oktoid/messaging/wiring), which a module's wiring constructs with the verify keys from the secret store. A receiver given none refuses every token, which fails closed.

A verifier that throws or rejects is not a defect the caller sees: the receiver logs the error's class and refuses the message as actor_token_invalid.

Methods​

verify()​

verify(input): ActorVerification | Promise<ActorVerification>

Defined in: packages/messaging/src/ports.ts:140

Parameters​

input​

ActorVerificationInput

The message as received.

Returns​

ActorVerification | Promise<ActorVerification>

The actor the token vouches for and its signer, or a refusal. Should not throw; if it does the receiver refuses.