Agy OAuth 클라이언트 시크릿 전사 오타 수정
Some checks failed
API contract / OpenAPI type drift (push) Failing after 41s
Some checks failed
API contract / OpenAPI type drift (push) Failing after 41s
This commit is contained in:
parent
fefca4743e
commit
bda7ebb908
2 changed files with 9 additions and 1 deletions
|
|
@ -73,7 +73,7 @@ _AGY_OAUTH = {
|
||||||
"token_url": "https://oauth2.googleapis.com/token",
|
"token_url": "https://oauth2.googleapis.com/token",
|
||||||
"redirect_uri": "http://localhost:1455/auth/callback",
|
"redirect_uri": "http://localhost:1455/auth/callback",
|
||||||
"client_id": "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",
|
"client_id": "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",
|
||||||
"client_secret": "GOCSPX-K58FWR486LdLJ1mLB8sXC4zqDAf",
|
"client_secret": "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",
|
||||||
"scope": (
|
"scope": (
|
||||||
"https://www.googleapis.com/auth/cloud-platform "
|
"https://www.googleapis.com/auth/cloud-platform "
|
||||||
"https://www.googleapis.com/auth/userinfo.email "
|
"https://www.googleapis.com/auth/userinfo.email "
|
||||||
|
|
|
||||||
|
|
@ -152,6 +152,14 @@ class PasteAndMetadataTest(unittest.TestCase):
|
||||||
self.assertIsNone(svc._chatgpt_account_id("not-a-jwt"))
|
self.assertIsNone(svc._chatgpt_account_id("not-a-jwt"))
|
||||||
self.assertIsNone(svc._chatgpt_account_id("h." + _b64url({"sub": "x"}) + ".s"))
|
self.assertIsNone(svc._chatgpt_account_id("h." + _b64url({"sub": "x"}) + ".s"))
|
||||||
|
|
||||||
|
def test_agy_client_credentials_are_well_formed(self):
|
||||||
|
# 구글 시크릿은 GOCSPX- + 28자다. 전사 오타(한 글자 누락)가 401 invalid_client를 만든다.
|
||||||
|
credential = svc._AGY_OAUTH
|
||||||
|
self.assertRegex(credential["client_secret"], r"^GOCSPX-[A-Za-z0-9_-]{28}$")
|
||||||
|
self.assertRegex(
|
||||||
|
credential["client_id"], r"^\d{12,13}-[a-z0-9]+\.apps\.googleusercontent\.com$"
|
||||||
|
)
|
||||||
|
|
||||||
def test_default_tier_prefers_is_default_flag(self):
|
def test_default_tier_prefers_is_default_flag(self):
|
||||||
loaded = {
|
loaded = {
|
||||||
"allowedTiers": [{"id": "free-tier"}, {"id": "paid-tier", "isDefault": True}],
|
"allowedTiers": [{"id": "free-tier"}, {"id": "paid-tier", "isDefault": True}],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue