fkooman\OAuth\Client\PdoStorage::getRefreshToken PHP Метод

getRefreshToken() публичный Метод

public getRefreshToken ( $clientConfigId, Context $context )
$context Context
    public function getRefreshToken($clientConfigId, Context $context)
    {
        $stmt = $this->db->prepare(sprintf('SELECT * FROM %s WHERE client_config_id = :client_config_id AND user_id = :user_id AND scope = :scope', $this->prefix . 'refresh_tokens'));
        $stmt->bindValue(':client_config_id', $clientConfigId, PDO::PARAM_STR);
        $stmt->bindValue(':user_id', $context->getUserId(), PDO::PARAM_STR);
        $stmt->bindValue(':scope', $context->getScope()->toString(), PDO::PARAM_STR);
        $stmt->execute();
        $result = $stmt->fetch(PDO::FETCH_ASSOC);
        if (false !== $result) {
            $result['scope'] = Scope::fromString($result['scope']);
            return new RefreshToken($result);
        }
        return false;
    }