/** * {@inheritDoc} */ public function retrieveAccessToken($service) { if (!$this->hasAccessToken($service)) { throw new TokenNotFoundException('Token not found in redis'); } if (isset($this->cachedTokens[$service])) { return $this->cachedTokens[$service]; } $val = $this->redis->hget($this->key, $service); return $this->cachedTokens[$service] = unserialize($val); }
/** * {@inheritDoc} */ public function retrieveAuthorizationState($service) { if (!$this->hasAuthorizationState($service)) { throw new AuthorizationStateNotFoundException('State not found in redis'); } if (isset($this->cachedStates[$service])) { return $this->cachedStates[$service]; } $val = $this->redis->hget($this->stateKey, $service); return $this->cachedStates[$service] = unserialize($val); }