1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 10:13:31 +00:00

[EC-598] feat: extend return from authenticator

This commit is contained in:
Andreas Coroiu
2023-03-30 15:57:46 +02:00
parent 6fd5801739
commit 43a13cb451
3 changed files with 36 additions and 13 deletions

View File

@@ -4,13 +4,17 @@ export abstract class Fido2AuthenticatorService {
*
* @return {Uint8Array} Attestation object
**/
makeCredential: (params: Fido2AuthenticatorMakeCredentialsParams) => Promise<Uint8Array>;
makeCredential: (
params: Fido2AuthenticatorMakeCredentialsParams,
abortController?: AbortController
) => Promise<Fido2AuthenticatorMakeCredentialResult>;
/**
* Generate an assertion using an existing credential
*/
getAssertion: (
params: Fido2AuthenticatorGetAssertionParams
params: Fido2AuthenticatorGetAssertionParams,
abortController?: AbortController
) => Promise<Fido2AuthenticatorGetAssertionResult>;
}
@@ -84,6 +88,13 @@ export interface Fido2AuthenticatorMakeCredentialsParams {
// requireUserPresence: true; // Always required
}
export interface Fido2AuthenticatorMakeCredentialResult {
credentialId: BufferSource;
attestationObject: BufferSource;
authData: BufferSource;
publicKeyAlgorithm: number;
}
export interface Fido2AuthenticatorGetAssertionParams {
/** The callers RP ID, as determined by the user agent and the client. */
rpId: string;