Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace LambdaTwelve\OneRecord\Server\Spi; |
| 6 | |
| 7 | use LambdaTwelve\OneRecord\Rdf\Iri; |
| 8 | |
| 9 | /** |
| 10 | * Grants given to organisations, directly by the holder or by accepting an |
| 11 | * access delegation request. A policy that honours delegations consults it; |
| 12 | * revoking a delegation request withdraws the grants it created (and the |
| 13 | * spec's trust chains: anything further delegated from them). |
| 14 | */ |
| 15 | interface AccessDelegationStore |
| 16 | { |
| 17 | public function grant(Grant $grant): void; |
| 18 | |
| 19 | /** |
| 20 | * @return list<Grant> |
| 21 | */ |
| 22 | public function grantsFor(Iri $agent, Iri $logisticsObject): array; |
| 23 | |
| 24 | /** |
| 25 | * Withdraws every grant that came from this delegation request. |
| 26 | */ |
| 27 | public function revokeFrom(Iri $accessDelegationRequest): void; |
| 28 | |
| 29 | /** |
| 30 | * Withdraws every grant on an object: the host forgetting it (DataHolder::forget()). |
| 31 | */ |
| 32 | public function eraseFor(Iri $logisticsObject): void; |
| 33 | } |