/** * Delete an access token from Redis storage. * * @param \League\OAuth2\Server\Entity\AbstractTokenEntity $token * @return void */ public function delete(AbstractTokenEntity $token) { // Deletes the access token entry. $this->deleteKey($token->getToken(), 'oauth_access_tokens'); // Deletes the access token entry from the access tokens set. $this->deleteSet(null, 'oauth_access_tokens', $token->getToken()); // Deletes the access tokens associated scopes. $this->deleteKey($token->getToken(), 'oauth_access_token_scopes'); }
public function delete(AbstractTokenEntity $token) { $sql = 'DELETE FROM oauth_access_token_scopes' . ' WHERE access_token = ?;'; $this->db->execute($sql, [$token->getId()]); }