1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-03 17:12:49 -05:00

[PM-4168] update keys for WebAuthnLoginCredential (#3506)

* allow update of webauthnlogincredential

* Added Tests

* fixed tests to use commands

* addressing various feedback items
This commit is contained in:
Ike
2023-12-15 13:38:34 -08:00
committed by GitHub
parent d488ebec0f
commit 767c58466c
8 changed files with 286 additions and 22 deletions

View File

@ -2,6 +2,17 @@
public enum WebAuthnLoginAssertionOptionsScope
{
/*
Authentication is used when a user is trying to login in with a credential.
*/
Authentication = 0,
PrfRegistration = 1
/*
PrfRegistration is used when a user is trying to register a new credential.
*/
PrfRegistration = 1,
/*
UpdateKeySet is used when a user is enabling a credential for passwordless login
This is done by adding rotatable keys to the credential.
*/
UpdateKeySet = 2
}

View File

@ -7,4 +7,5 @@ public interface IWebAuthnCredentialRepository : IRepository<WebAuthnCredential,
{
Task<WebAuthnCredential> GetByIdAsync(Guid id, Guid userId);
Task<ICollection<WebAuthnCredential>> GetManyByUserIdAsync(Guid userId);
Task<bool> UpdateAsync(WebAuthnCredential credential);
}