MCPcopy
hub / github.com/mxrch/GHunt / __init__

Method __init__

ghunt/apis/accounts.py:13–36  ·  view source on GitHub ↗
(self, creds: GHuntCreds, headers: Dict[str, str] = {})

Source from the content-addressed store, hash-verified

11
12class Accounts(GAPI):
13 def __init__(self, creds: GHuntCreds, headers: Dict[str, str] = {}):
14 super().__init__()
15
16 if not headers:
17 headers = gb.config.headers
18
19 base_headers = {}
20
21 headers = {**headers, **base_headers}
22
23 # Android OAuth fields
24 self.api_name = "chrome"
25 self.package_name = "com.android.chrome"
26 self.scopes = [
27 "https://www.google.com/accounts/OAuthLogin"
28 ]
29
30 self.hostname = "accounts.google.com"
31 self.scheme = "https"
32
33 self.authentication_mode = "oauth" # sapisidhash, cookies_only, oauth or None
34 self.require_key = None # key name, or None
35
36 self._load_api(creds, headers)
37
38 async def OAuthLogin(self, as_client: httpx.AsyncClient) -> str:
39 endpoint_name = inspect.currentframe().f_code.co_name

Callers

nothing calls this directly

Calls 1

_load_apiMethod · 0.80

Tested by

no test coverage detected