with twostep
This commit is contained in:
17
wrapper.py
17
wrapper.py
@ -36,6 +36,23 @@ class IPAToolClient(BaseAsyncClient):
|
||||
return json_data
|
||||
return False
|
||||
|
||||
async def auth_twostep(self, user: str, pswd: str, code: str):
|
||||
r = await self._post(
|
||||
"/auth/twostep",
|
||||
params={
|
||||
"user": user,
|
||||
"pswd": pswd,
|
||||
"code": code,
|
||||
"keychain": pswd,
|
||||
},
|
||||
)
|
||||
if r.status != 200:
|
||||
return False
|
||||
json_data = await r.json()
|
||||
if isinstance(json_data, bool):
|
||||
return json_data
|
||||
return False
|
||||
|
||||
async def app_info(self, query: str, limit: int, keychain: str) -> dict:
|
||||
r = await self._post(
|
||||
"/app/search",
|
||||
|
||||
Reference in New Issue
Block a user