mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 16:38:59 -04:00
Merge pull request #3892 from alphagov/update-remove-webauthn-cred
Let admin user update and delete their security key
This commit is contained in:
@@ -201,5 +201,15 @@ class UserApiClient(NotifyAdminAPIClient):
|
||||
|
||||
return self.post(endpoint, data=credential.serialize())
|
||||
|
||||
def update_webauthn_credential_name_for_user(self, *, user_id, credential_id, new_name_for_credential):
|
||||
endpoint = f'/user/{user_id}/webauthn/{credential_id}'
|
||||
|
||||
return self.post(endpoint, data={"name": new_name_for_credential})
|
||||
|
||||
def delete_webauthn_credential_for_user(self, *, user_id, credential_id):
|
||||
endpoint = f'/user/{user_id}/webauthn/{credential_id}'
|
||||
|
||||
return self.delete(endpoint)
|
||||
|
||||
|
||||
user_api_client = UserApiClient()
|
||||
|
||||
Reference in New Issue
Block a user