def delete(self):
        if self.cred.name in ['YubiKey slot 1', 'YubiKey slot 2']:
            self._controller.delete_cred_legacy(int(self.cred.name[-1]))
        else:
            self._controller.delete_cred(self.cred.name)