(self, request)
Refresh the access token and scopes.

        Args:
            request (google.auth.transport.Request): The object used to make
                HTTP requests.

        Raises:
            google.auth.exceptions.RefreshError: If the Compute Engine metadata
                service can't be reached if if the instance has not
                credentials.
Refresh the access token and scopes.
Refresh the access token and scopes .
def refresh(self, request):
        """Refresh the access token and scopes.

        Args:
            request (google.auth.transport.Request): The object used to make
                HTTP requests.

        Raises:
            google.auth.exceptions.RefreshError: If the Compute Engine metadata
                service can't be reached if if the instance has not
                credentials.
        """
        scopes = self._scopes if self._scopes is not None else self._default_scopes
        try:
            self._retrieve_info(request)
            self.token, self.expiry = _metadata.get_service_account_token(
                request, service_account=self._service_account_email, scopes=scopes
            )
        except exceptions.TransportError as caught_exc:
            new_exc = exceptions.RefreshError(caught_exc)
            six.raise_from(new_exc, caught_exc)
def refresh ( self , request ) : scopes = self . _scopes if self . _scopes is not None else self . _default_scopes try : self . _retrieve_info ( request ) self . token , self . expiry = _metadata . get_service_account_token ( request , service_account = self . _service_account_email , scopes = scopes ) except exceptions . TransportError as caught_exc : new_exc = exceptions . RefreshError ( caught_exc ) six . raise_from ( new_exc , caught_exc )