def refresh_access_token(self):
    if (self._refresh_token is None):
        raise ValueError('no refresh token available with which to refresh authorization credentials')
    resp = _requests.post(url=self._token_endpoint, data={'grant_type': 'refresh_token', 'client_id': self._client_id, 'refresh_token': self._refresh_token}, headers=self._headers, allow_redirects=False)
    if (resp.status_code != _StatusCodes.OK):
        self._expired = True
        _keyring.delete_password(_keyring_service_name, _keyring_access_token_storage_key)
        _keyring.delete_password(_keyring_service_name, _keyring_refresh_token_storage_key)
        return
    self._initialize_credentials(resp)
def refresh_access_token(self):
    if (self._refresh_token is None):
        raise ValueError('no refresh token available with which to refresh authorization credentials')
    resp = _requests.post(url=self._token_endpoint, data={'grant_type': 'refresh_token', 'client_id': self._client_id, 'refresh_token': self._refresh_token}, headers=self._headers, allow_redirects=False)
    if (resp.status_code != _StatusCodes.OK):
        self._expired = True
        _keyring.delete_password(_keyring_service_name, _keyring_access_token_storage_key)
        _keyring.delete_password(_keyring_service_name, _keyring_refresh_token_storage_key)
        return
    self._initialize_credentials(resp)