MCPcopy Create free account
hub / github.com/vastsa/FileCodeBox / acquire_token_pwd

Method acquire_token_pwd

core/storage.py:605–615  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected