MCPcopy Create free account
hub / github.com/su-kaka/gcli2api / __init__

Method __init__

src/google_oauth_api.py:33–51  ·  view source on GitHub ↗
(
        self,
        access_token: str,
        refresh_token: str = None,
        client_id: str = None,
        client_secret: str = None,
        expires_at: datetime = None,
        project_id: str = None,
    )

Source from the content-addressed store, hash-verified

31 """凭证类"""
32
33 def __init__(
34 self,
35 access_token: str,
36 refresh_token: str = None,
37 client_id: str = None,
38 client_secret: str = None,
39 expires_at: datetime = None,
40 project_id: str = None,
41 ):
42 self.access_token = access_token
43 self.refresh_token = refresh_token
44 self.client_id = client_id
45 self.client_secret = client_secret
46 self.expires_at = expires_at
47 self.project_id = project_id
48
49 # 反代配置将在使用时异步获取
50 self.oauth_base_url = None
51 self.token_endpoint = None
52
53 def is_expired(self) -> bool:
54 """检查token是否过期"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected