Closed
Description
Working with JWKS can have a serious impact on performance if the signing key is fetched on every request.
While fetching the Keys currently is left to the app specific implementation shouldn't fetching and caching the response from an external resource be something firebase/php-jwt should do?
Auth0 suggests to implement caching and .Net 6 seems to do it as well:
https://community.auth0.com/t/caching-jwks-signing-key/17654/2
https://github.com/auth0/node-jwks-rsa#caching
Taking all considerations into account and implement it here eliminates doing it over and over again.
Maybe (optionally) using https://packagist.org/packages/psr/simple-cache as a simple cache interface would be the way to go?