aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php')
-rw-r--r--lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php
index 2fbf6fd375d..72c557eb53a 100644
--- a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php
+++ b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php
@@ -84,4 +84,17 @@ class PublicKeyCredentialMapper extends QBMapper {
return $this->findEntity($qb);
}
+
+ /**
+ * @throws \OCP\DB\Exception
+ */
+ public function deleteByUid(string $uid) {
+ $qb = $this->db->getQueryBuilder();
+
+ $qb->delete($this->getTableName())
+ ->where(
+ $qb->expr()->eq('uid', $qb->createNamedParameter($uid))
+ );
+ $qb->executeStatement();
+ }
}