From 000e5f76199578443b4904f65e8289611e9c5b2e Mon Sep 17 00:00:00 2001 From: trojvn Date: Thu, 6 Nov 2025 23:15:03 +0300 Subject: [PATCH] fix auth --- auth.py | 2 +- wrapper.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/auth.py b/auth.py index 32296cc..83912e1 100644 --- a/auth.py +++ b/auth.py @@ -15,7 +15,7 @@ async def main(): print(udid, "no auth response") continue print(udid, "auth success") - if not client.auth_check(info.user): + if not await client.auth_check(info.pswd): code = input(f"Enter the code for {udid}: ") if not await client.auth_twostep(info.user, info.pswd, code): print(udid, "no twostep response") diff --git a/wrapper.py b/wrapper.py index 0f2bc0f..7ffb37d 100644 --- a/wrapper.py +++ b/wrapper.py @@ -27,8 +27,8 @@ class IPAToolClient(BaseAsyncClient): return json_data return False - async def auth_check(self, user: str) -> bool: - r = await self._post("/auth/check", params={"user": user}) + async def auth_check(self, keychain: str) -> bool: + r = await self._post("/auth/check", params={"keychain": keychain}) if r.status != 200: return False json_data = await r.json()