Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use Symfony PSR-6 > PSR-16 cache adapter #110

Merged
merged 2 commits into from
Mar 15, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Security/Auth0Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
use Auth0\SDK\Helpers\Tokens\TokenVerifier;
use Auth0\SDK\Exception\InvalidTokenException;
use Auth0\JWTAuthBundle\Security\Helpers\JwtValidations;
use Auth0\JWTAuthBundle\Security\Helpers\Auth0Psr16Adapter;
use Psr\Cache\CacheItemPoolInterface;
use Psr\SimpleCache\CacheInterface;
use Symfony\Component\Cache\Psr16Cache;

/**
* Service that provides access to the Auth0 SDK and JWT validation
Expand Down Expand Up @@ -127,7 +127,7 @@ public function __construct(
$this->issuer = 'https://'.$this->domain.'/';
$this->algorithm = (null !== $algorithm && mb_strtoupper($algorithm) === 'HS256') ? 'HS256' : 'RS256';
$this->validations = $validations ?? [];
$this->cache = $cache ? new Auth0Psr16Adapter($cache) : null;
$this->cache = $cache ? new Psr16Cache($cache) : null;

if (null !== $authorizedIssuer && strlen($authorizedIssuer)) {
$this->issuer = $authorizedIssuer;
Expand Down