更新代码
This commit is contained in:
@@ -218,7 +218,28 @@ def create_auth_challenge(
|
||||
request_body["scopes"] = scopes
|
||||
return _make_request('POST', url, headers, request_body=request_body)
|
||||
|
||||
def perform_auth_challenge(
|
||||
def get_auth_methods(
|
||||
account: str,
|
||||
) -> dict:
|
||||
"""获取认证方式"""
|
||||
url = f"{DOMAIN}/api/auth/challenge/{account}/factors"
|
||||
headers = {
|
||||
'accept': 'application/json',
|
||||
}
|
||||
return _make_request('GET', url, headers)
|
||||
|
||||
def send_verification_code(
|
||||
id: str,
|
||||
factor_id: str,
|
||||
) -> dict:
|
||||
"""发送验证码"""
|
||||
url = f"{DOMAIN}/api/auth/challenge/{id}/factors/{factor_id}"
|
||||
headers = {
|
||||
'accept': 'application/json',
|
||||
}
|
||||
return _make_request('POST', url, headers)
|
||||
|
||||
def perform_auth_challenge_password(
|
||||
challenge_id: str,
|
||||
factor_id: str,
|
||||
password: str
|
||||
|
Reference in New Issue
Block a user