mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 07:13:32 +00:00
[PM-4370] Implement PRF key rotation (#9517)
* Add prf key rotation * Fix tests * Re-add comment * Remove encrypted private key from webauthnlogincredentialresponse * Refactor to use rotateablekeyset * Move key rotation logic to webauthn-login-admin service * Fix type error * Add parameter validation * Add documentation * Add input validation * Add tests
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { EncString } from "@bitwarden/common/platform/models/domain/enc-string";
|
||||
|
||||
import { RotateableKeySet } from "../../../../../auth/src/common/models";
|
||||
|
||||
export class WebauthnRotateCredentialRequest {
|
||||
id: string;
|
||||
encryptedPublicKey: EncString;
|
||||
encryptedUserKey: EncString;
|
||||
|
||||
constructor(id: string, encryptedPublicKey: EncString, encryptedUserKey: EncString) {
|
||||
this.id = id;
|
||||
this.encryptedPublicKey = encryptedPublicKey;
|
||||
this.encryptedUserKey = encryptedUserKey;
|
||||
}
|
||||
|
||||
static fromRotateableKeyset(
|
||||
id: string,
|
||||
keyset: RotateableKeySet,
|
||||
): WebauthnRotateCredentialRequest {
|
||||
return new WebauthnRotateCredentialRequest(
|
||||
id,
|
||||
keyset.encryptedPublicKey,
|
||||
keyset.encryptedPrivateKey,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user