public function updateCredentials($user, $password)
    {
        $oldUser = $this->credentials->getUsername();
        $this->credentials = new Credentials($this->credentials->getClientId(), $user, $password);
        unset($password);
        if ($this->client instanceof Client) {
            $this->client = $this->oauth2Middleware = null;
            $this->client = $this->getClient();
        }
        if ($this->cache instanceof CacheProvider) {
            $this->cache->setNamespace(md5($this->basepath . $this->credentials->getUsername() . $this->credentials->getPassword()));
        }
        $this->logger->notice('Updated user!', ['old' => $oldUser, 'new' => $user]);
    }