Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update set_allowed_admin_auth_methods in admin.py #277

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions duo_client/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2155,6 +2155,8 @@ def set_allowed_admin_auth_methods(self,
mobile_otp_enabled=None,
yubikey_enabled=None,
hardware_token_enabled=None,
verified_push_enabled=None,
verified_push_length=None
):
params = {}
if push_enabled is not None:
Expand All @@ -2175,6 +2177,12 @@ def set_allowed_admin_auth_methods(self,
if voice_enabled is not None:
params['voice_enabled'] = (
'1' if voice_enabled else '0')
if verified_push_enabled is not None:
params['verified_push_enabled'] = (
'1' if verified_push_enabled else '0')
if params['verified_push_enabled'] == '1':
params['verified_push_length'] = (
verified_push_length if verified_push_length is not None else 3)
response = self.json_api_call(
'POST',
'/admin/v1/admins/allowed_auth_methods',
Expand Down
Loading