jwks_url = $jwks_url; $this->http_client = $http_client; } /** * Returns the key set to verify the JWT * * The JWKS is fetched lazily when a key is looked up, and cached for a week. * * @return CachedKeySet the key set used for verifying the signature of the JWT */ public function get_key() { return new CachedKeySet( $this->jwks_url, $this->http_client, new Psr17Factory(), new Pool( new BinaryCacheDecorator( new Transient() ), new Expiration() ), WEEK_IN_SECONDS, true ); } }