driver = $driver; } /** * {@inheritdoc} */ public function retrieveAccessToken() { if( $this->cachedToken instanceOf TokenInterface ) { return $this->token; } // TODO: check to see if the token is cached throw new TokenNotFoundException('Token not stored'); } /** * {@inheritdoc} */ public function storeAccessToken(TokenInterface $token) { $this->cachedToken = $token; // TODO: actually store the token } /** * {@inheritdoc} */ public function hasAccessToken() { if( $this->cachedToken ) { return true; } // TODO: check cache for token return false; } /** * {@inheritdoc} */ public function clearToken() { $this->cachedToken = null; // TODO: clear cache of the token } }