Skip to content
docsv0.12.0

AuthorizationVerdict

The answer, with the reason attached when it is no. A boolean would force the caller to invent the explanation, and the four ways an authorization fails are not interchangeable to whoever is standing at the terminal: a bad signature means stop, an expired one means sign again, a reused one means something is replaying, and a mismatched one means the authorization is for a different act than the one about to run.

AuthorizationVerdict::granted()

public static function granted(Milpa\ToolRuntime\Identity\VerifiedSigner $signer): self

The signature established this signer, for this call, now, once.

Parameters

Parameters of granted()
NameTypeDescription
$signerMilpa\ToolRuntime\Identity\VerifiedSigner

AuthorizationVerdict::denied()

public static function denied(string $reason): self

Refused, with the sentence the operator needs to read.

Parameters

Parameters of denied()
NameTypeDescription
$reasonstring