Removes a credential from the authenticator. Example: `credential_id = "user@example.com"` `driver.remove_credential(credential_id)`
(self, credential_id: str | bytearray)
| 1775 | |
| 1776 | @_required_virtual_authenticator |
| 1777 | def remove_credential(self, credential_id: str | bytearray) -> None: |
| 1778 | """Removes a credential from the authenticator. |
| 1779 | |
| 1780 | Example: |
| 1781 | `credential_id = "user@example.com"` |
| 1782 | `driver.remove_credential(credential_id)` |
| 1783 | """ |
| 1784 | # Check if the credential is bytearray converted to b64 string |
| 1785 | if isinstance(credential_id, bytearray): |
| 1786 | credential_id = urlsafe_b64encode(credential_id).decode() |
| 1787 | |
| 1788 | self.execute( |
| 1789 | Command.REMOVE_CREDENTIAL, |
| 1790 | {"credentialId": credential_id, "authenticatorId": self._authenticator_id}, |
| 1791 | ) |
| 1792 | |
| 1793 | @_required_virtual_authenticator |
| 1794 | def remove_all_credentials(self) -> None: |