Skip to content

Commit

Permalink
add txid and client_supports_verified_push (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
kalapathar committed Mar 18, 2024
1 parent 32265f6 commit 6683995
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion duo_client/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def preauth(self,
username=None,
user_id=None,
ipaddr=None,
client_supports_verified_push=None,
trusted_device_token=None):
"""
Determine if and with what factors a user may authenticate or enroll.
Expand All @@ -100,6 +101,8 @@ def preauth(self,
params['user_id'] = user_id
if ipaddr is not None:
params['ipaddr'] = ipaddr
if client_supports_verified_push is not None:
params['client_supports_verified_push'] = client_supports_verified_push
if trusted_device_token is not None:
params['trusted_device_token'] = trusted_device_token
response = self.json_api_call('POST',
Expand All @@ -117,7 +120,8 @@ def auth(self,
display_username=None,
pushinfo=None,
device=None,
passcode=None):
passcode=None,
txid=None):
"""
Perform second-factor authentication for a user.
Expand Down Expand Up @@ -156,6 +160,8 @@ def auth(self,
params['device'] = device
if passcode is not None:
params['passcode'] = passcode
if txid is not None:
params['txid'] = txid
response = self.json_api_call('POST',
'/auth/v2/auth',
params)
Expand Down

0 comments on commit 6683995

Please sign in to comment.