(
self, client_id: str, client_secret: str, scopes: List[str], redirect_uri: str = None
)
| 171 | """OAuth流程类""" |
| 172 | |
| 173 | def __init__( |
| 174 | self, client_id: str, client_secret: str, scopes: List[str], redirect_uri: str = None |
| 175 | ): |
| 176 | self.client_id = client_id |
| 177 | self.client_secret = client_secret |
| 178 | self.scopes = scopes |
| 179 | self.redirect_uri = redirect_uri |
| 180 | |
| 181 | # 反代配置将在使用时异步获取 |
| 182 | self.oauth_base_url = None |
| 183 | self.token_endpoint = None |
| 184 | self.auth_endpoint = "https://accounts.google.com/o/oauth2/auth" |
| 185 | |
| 186 | self.credentials: Optional[Credentials] = None |
| 187 | |
| 188 | def get_auth_url(self, state: str = None, **kwargs) -> str: |
| 189 | """生成授权URL""" |
nothing calls this directly
no outgoing calls
no test coverage detected