(self)
| 603 | raise Exception("OneDrive验证失败,请检查配置是否正确\n" + str(e)) |
| 604 | |
| 605 | def acquire_token_pwd(self): |
| 606 | authority_url = f"https://login.microsoftonline.com/{self.domain}" |
| 607 | app = self.msal.PublicClientApplication( |
| 608 | authority=authority_url, client_id=self.client_id |
| 609 | ) |
| 610 | result = app.acquire_token_by_username_password( |
| 611 | username=self.username, |
| 612 | password=self.password, |
| 613 | scopes=["https://graph.microsoft.com/.default"], |
| 614 | ) |
| 615 | return result |
| 616 | |
| 617 | def _get_path_str(self, path): |
| 618 | if isinstance(path, str): |
nothing calls this directly
no outgoing calls
no test coverage detected