ConsentGrant
THE FACT: a principal answered a concrete question, for a concrete act, under a concrete context. Greenhouse decisions/0030, in Rod's words: «El consentimiento ocurre una vez; todo lo demás debería ser transporte, evidencia o proyección de ese mismo acto.» That acta names what was found: three components can each recognise a different representation of consent and none of them be its canonical authority. A session asked and recorded a permission, a gate wanted a signature, an orchestrator wanted the word CONFIRMAR — each reasonable alone, none aware of the other two, and a human who said yes watched nothing happen (evidence/0176). This is the fact they should all consume. A token, a signature and a human word remain what they always were — MECHANISMS TO PRODUCE OR DEMONSTRATE this grant — and stop being parallel authorities. `provenance` is where each one leaves its trace, so the grant can say HOW it was earned without any consumer having to re-earn it. IT IS NOT A MASTER KEY, and the shape says so: it names one operation, one principal, one session, and the arguments it was given for. Change a substantive dimension and it stops covering the call — that is what separates a grant from an open door, and it is case 2 of the frozen battery.
ConsentGrant::__construct()
public function __construct(Milpa\Command\Consent\OperationId $operation, ?string $principal, ?string $session, DateTimeImmutable $grantedAt, string $provenance, array $arguments = [], array $scope = []):Parameters
| Name | Type | Description |
|---|---|---|
| $operation | Milpa\Command\Consent\OperationId | |
| $principal | ?string | |
| $session | ?string | |
| $grantedAt | DateTimeImmutable | |
| $provenance | string | |
| $arguments | array<string, mixed> | los argumentos SOBRE LOS QUE se consintió; vacío significa «para esta operación en esta sesión», que es lo que una pregunta de sesión produce hoy |
| $scope | list<string> | permisos adicionales que el sí abarcó, si los hubo |
ConsentGrant::covers()
public function covers(Milpa\Command\Consent\OperationId|string $operacion, array $argumentos = [], ?string $sesion = null): bool¿Este hecho cubre ESTA llamada? La identidad se compara por {@see OperationId}, nunca por cadena: una compuerta que compara ortografías está comparando UI. Y los argumentos se comparan sólo cuando el grant los nombró — un sí dado «para esta operación en esta sesión» no puede fingir que revisó argumentos que nadie le enseñó, y decirlo es más honesto que aceptarlos en silencio.
Parameters
| Name | Type | Description |
|---|---|---|
| $operacion | Milpa\Command\Consent\OperationId|string | |
| $argumentos | array<string, mixed> | |
| $sesion | ?string |
ConsentGrant::evidence()
public function evidence(): stringLo que un consumidor guarda para poder demostrar de dónde salió el sí.