|
| __construct (string $jwksUri, ClientInterface $httpClient, RequestFactoryInterface $httpFactory, CacheItemPoolInterface $cache, int $expiresAfter=null, bool $rateLimit=false, string $defaultAlg=null) |
|
| offsetGet ($keyId) |
|
| offsetExists ($keyId) |
|
| offsetSet ($offset, $value) |
|
| offsetUnset ($offset) |
|
<string, Key>
Definition at line 19 of file CachedKeySet.php.
◆ __construct()
Firebase\JWT\CachedKeySet::__construct |
( |
string |
$jwksUri, |
|
|
ClientInterface |
$httpClient, |
|
|
RequestFactoryInterface |
$httpFactory, |
|
|
CacheItemPoolInterface |
$cache, |
|
|
int |
$expiresAfter = null , |
|
|
bool |
$rateLimit = false , |
|
|
string |
$defaultAlg = null |
|
) |
| |
◆ formatJwksForCache()
Firebase\JWT\CachedKeySet::formatJwksForCache |
( |
string |
$jwks | ) |
|
|
private |
◆ getCacheItem()
Firebase\JWT\CachedKeySet::getCacheItem |
( |
| ) |
|
|
private |
◆ keyIdExists()
Firebase\JWT\CachedKeySet::keyIdExists |
( |
string |
$keyId | ) |
|
|
private |
◆ offsetExists()
Firebase\JWT\CachedKeySet::offsetExists |
( |
|
$keyId | ) |
|
◆ offsetGet()
Firebase\JWT\CachedKeySet::offsetGet |
( |
|
$keyId | ) |
|
◆ offsetSet()
Firebase\JWT\CachedKeySet::offsetSet |
( |
|
$offset, |
|
|
|
$value |
|
) |
| |
◆ offsetUnset()
Firebase\JWT\CachedKeySet::offsetUnset |
( |
|
$offset | ) |
|
◆ rateLimitExceeded()
Firebase\JWT\CachedKeySet::rateLimitExceeded |
( |
| ) |
|
|
private |
◆ setCacheKeys()
Firebase\JWT\CachedKeySet::setCacheKeys |
( |
| ) |
|
|
private |
Definition at line 238 of file CachedKeySet.php.
References ILIAS\LTI\ToolProvider\$key.
Referenced by Firebase\JWT\CachedKeySet\__construct().
240 if (empty($this->jwksUri)) {
245 $key = preg_replace(
'|[^a-zA-Z0-9_\.!]|',
'', $this->jwksUri);
248 $key = $this->cacheKeyPrefix .
$key;
251 if (\strlen(
$key) > $this->maxKeyLength) {
252 $key = substr(
hash(
'sha256',
$key), 0, $this->maxKeyLength);
255 $this->cacheKey =
$key;
257 if ($this->rateLimit) {
259 $rateLimitKey = $this->cacheKeyPrefix .
'ratelimit' .
$key;
262 if (\strlen($rateLimitKey) > $this->maxKeyLength) {
263 $rateLimitKey = substr(
hash(
'sha256', $rateLimitKey), 0, $this->maxKeyLength);
266 $this->rateLimitCacheKey = $rateLimitKey;
◆ $cache
CacheItemPoolInterface Firebase\JWT\CachedKeySet::$cache |
|
private |
◆ $cacheItem
CacheItemInterface Firebase\JWT\CachedKeySet::$cacheItem |
|
private |
◆ $cacheKey
string Firebase\JWT\CachedKeySet::$cacheKey |
|
private |
◆ $cacheKeyPrefix
string Firebase\JWT\CachedKeySet::$cacheKeyPrefix = 'jwks' |
|
private |
◆ $defaultAlg
string Firebase\JWT\CachedKeySet::$defaultAlg |
|
private |
◆ $expiresAfter
int Firebase\JWT\CachedKeySet::$expiresAfter |
|
private |
◆ $httpClient
ClientInterface Firebase\JWT\CachedKeySet::$httpClient |
|
private |
◆ $httpFactory
RequestFactoryInterface Firebase\JWT\CachedKeySet::$httpFactory |
|
private |
◆ $jwksUri
string Firebase\JWT\CachedKeySet::$jwksUri |
|
private |
◆ $keySet
array Firebase\JWT\CachedKeySet::$keySet |
|
private |
◆ $maxCallsPerMinute
int Firebase\JWT\CachedKeySet::$maxCallsPerMinute = 10 |
|
private |
◆ $maxKeyLength
int Firebase\JWT\CachedKeySet::$maxKeyLength = 64 |
|
private |
◆ $rateLimit
bool Firebase\JWT\CachedKeySet::$rateLimit |
|
private |
◆ $rateLimitCacheKey
string Firebase\JWT\CachedKeySet::$rateLimitCacheKey |
|
private |
The documentation for this class was generated from the following file: