Skip to content

Commit 0336ecc

Browse files
committed
fix: haskey
1 parent 227cbbe commit 0336ecc

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/NetDevPack.Fido2.EntityFramework.Store/Store/Fido2Store.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,10 @@ public async Task<bool> RemoveBySecretName(string name)
107107
}
108108
return false;
109109
}
110+
111+
public async Task<bool> HasSecurityKey(string name)
112+
{
113+
return await _context.Fido2StoredCredential.AnyAsync(f => f.SecurityKeyName == name);
114+
}
110115
}
111116
}

src/NetDevPack.Fido2.EntityFramework.Store/Store/IFido2Store.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ public interface IFido2Store
2020
Task<List<StoredCredentialDetail>> ListCredentialDetailsByUser(string username);
2121
Task<bool> RemoveByPublicKeyId(byte[] publicKeyId);
2222
Task<bool> RemoveBySecretName(string name);
23+
Task<bool> HasSecurityKey(string name);
2324
}

0 commit comments

Comments
 (0)