File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Pdsinterop \Solid \Auth ;
4+
5+ /**
6+ * This interface defines methods that a storage layer need to implement
7+ * in order to allow the JTI Service to validate JTI tokens.
8+ *
9+ * Such a token is a string between 12 and [..] characters of length.
10+ */
11+ interface JtiStorageInterface
12+ {
13+ /**
14+ * Store a given JTI for a given URI
15+ *
16+ * @param string|object $jti string or string-able object
17+ * @param string $targetUri
18+ *
19+ * @return void
20+ *
21+ * @throws \Exception When storage fails, any type of Exception might be thrown...
22+ */
23+ public function store (string |object $ jti , string $ targetUri ): void ;
24+
25+ /**
26+ * Retrieve a given JTI for a given URI
27+ *
28+ * @param string|object $jti string or string-able object
29+ * @param string $targetUri
30+ *
31+ * @return bool
32+ *
33+ * @throws \Exception When retrieval fails, any type of Exception might be thrown...
34+ */
35+ public function retrieve (string |object $ jti , string $ targetUri ): bool ;
36+
37+ /**
38+ * Create a new storage slot and discard the oldest slot
39+ *
40+ * @return void
41+ *
42+ * @throws \Exception When rotation fails, any type of Exception might be thrown...
43+ */
44+ public function rotateBuckets (): void ;
45+ }
You can’t perform that action at this time.
0 commit comments