1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00
Files
browser/libs/common/src/webauthn/abstractions/fido2-user-interface.service.abstraction.ts
2023-04-05 11:38:32 +02:00

46 lines
1.6 KiB
TypeScript

export interface NewCredentialParams {
credentialName: string;
userName: string;
}
export abstract class Fido2UserInterfaceService {
newSession: (abortController?: AbortController) => Promise<Fido2UserInterfaceSession>;
// confirmCredential: (cipherId: string, abortController?: AbortController) => Promise<boolean>;
// pickCredential: (cipherIds: string[], abortController?: AbortController) => Promise<string>;
// confirmNewCredential: (
// params: NewCredentialParams,
// abortController?: AbortController
// ) => Promise<boolean>;
// confirmNewNonDiscoverableCredential: (
// params: NewCredentialParams,
// abortController?: AbortController
// ) => Promise<string | undefined>;
// informExcludedCredential: (
// existingCipherIds: string[],
// newCredential: NewCredentialParams,
// abortController?: AbortController
// ) => Promise<void>;
}
export abstract class Fido2UserInterfaceSession {
fallbackRequested = false;
aborted = false;
confirmCredential: (cipherId: string, abortController?: AbortController) => Promise<boolean>;
pickCredential: (cipherIds: string[], abortController?: AbortController) => Promise<string>;
confirmNewCredential: (
params: NewCredentialParams,
abortController?: AbortController
) => Promise<boolean>;
confirmNewNonDiscoverableCredential: (
params: NewCredentialParams,
abortController?: AbortController
) => Promise<string | undefined>;
informExcludedCredential: (
existingCipherIds: string[],
newCredential: NewCredentialParams,
abortController?: AbortController
) => Promise<void>;
}