duo_client_python
duo_client_python copied to clipboard
feat: add support for managing blocked devices in admin API
trafficstars
Added methods to block, unblock, and fetch blocked devices via the admin API. Updated test cases to validate the new functionality, including support for pagination and operations by device ID.
Description
Add the following methods to support recent additions to the Admin API for managing Duo Desktop registered devices:
- get_blocked_devices_generator()
- get_blocked_devices()
- get_blocked_device_by_id()
- block_registered_devices()
- block_registered_device_by_id()
- unblock_registered_devices()
- unblock_registered_device_by_id()
Motivation and Context
These new methods were added to support recent additions to the Admin API registered devices endpoint.
How Has This Been Tested?
Tested manually with personal Duo account. Added test cases in test_registered_devices.py and verified using nose2.
Types of Changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)