def METHOD_NAME(self, name: str, token: str) -> None:
    if not self.keyring.is_available():
        self.warn_plaintext_credentials_stored()
        self._config.auth_config_source.add_property(f"pypi-token.{name}", token)
    else:
        self.keyring.set_password(name, "__token__", token)