|
ILIAS
trunk Revision v13.0_alpha-62-g3b72d83f2e5
|
Fetches the proof keys from the discovery again when a request could not be verified with the stored ones - the WOPI client may have rotated its keys since the last crawl, see https://learn.microsoft.com/en-us/microsoft-365/cloud-storage-partner-program/online/scenarios/proofkeys. More...
Collaboration diagram for ILIAS\WOPI\Discovery\ProofKeyRefresh:Public Member Functions | |
| __construct (private ProofKeyRepository $repository, private \ilSetting $settings, private \Closure $fetch, ?\Closure $clock=null) | |
| __invoke () | |
Data Fields | |
| const | MIN_INTERVAL = 5 * 60 |
Private Attributes | |
| const | LAST_REFRESH = 'wopi_proof_refreshed_at' |
| Closure | $clock |
Fetches the proof keys from the discovery again when a request could not be verified with the stored ones - the WOPI client may have rotated its keys since the last crawl, see https://learn.microsoft.com/en-us/microsoft-365/cloud-storage-partner-program/online/scenarios/proofkeys.
Every request failing the verification would trigger a fetch, so it happens at most once within MIN_INTERVAL. A failed fetch keeps the stored keys.
Definition at line 33 of file ProofKeyRefresh.php.
| ILIAS\WOPI\Discovery\ProofKeyRefresh::__construct | ( | private ProofKeyRepository | $repository, |
| private \ilSetting | $settings, | ||
| private \Closure | $fetch, | ||
| ?\Closure | $clock = null |
||
| ) |
Closure(): ?ProofKeys $fetch reads the proof keys from the discovery
Closure(): int|null $clock returns the current unix timestamp, for testing
Definition at line 47 of file ProofKeyRefresh.php.
References ILIAS\WOPI\Discovery\ProofKeyRefresh\$clock.
| ILIAS\WOPI\Discovery\ProofKeyRefresh::__invoke | ( | ) |
Definition at line 59 of file ProofKeyRefresh.php.
References ILIAS\WOPI\Discovery\ProofKeyRefresh\$clock, ILIAS\WOPI\Discovery\ProofKeyRefresh\MIN_INTERVAL, ILIAS\UI\examples\Deck\repository(), and ILIAS\Repository\settings().
Here is the call graph for this function:
|
private |
Definition at line 41 of file ProofKeyRefresh.php.
Referenced by ILIAS\WOPI\Discovery\ProofKeyRefresh\__construct(), and ILIAS\WOPI\Discovery\ProofKeyRefresh\__invoke().
|
private |
Definition at line 36 of file ProofKeyRefresh.php.
| const ILIAS\WOPI\Discovery\ProofKeyRefresh::MIN_INTERVAL = 5 * 60 |
Definition at line 35 of file ProofKeyRefresh.php.
Referenced by ILIAS\WOPI\Discovery\ProofKeyRefresh\__invoke(), and ILIAS\WOPI\Discovery\ProofKeyRefreshTest\testFetchesAtMostOnceWithinTheInterval().