mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 10:13:31 +00:00
[EC-598] feat: start creating separate authenticator service
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
export abstract class Fido2AuthenticatorService {
|
||||
makeCredential: (params: Fido2AuthenticatorMakeCredentialsParams) => void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameters for {@link Fido2AuthenticatorService.makeCredential}
|
||||
*
|
||||
* @note
|
||||
* This interface uses the parameter names defined in `fido-v2.0-ps-20190130`
|
||||
* but the parameter values use the corresponding data structures defined in
|
||||
* `WD-webauthn-3-20210427`. This is to avoid the unnecessary complexity of
|
||||
* converting data to CBOR and back.
|
||||
*/
|
||||
export interface Fido2AuthenticatorMakeCredentialsParams {
|
||||
clientDataHash: BufferSource;
|
||||
rp: {
|
||||
name: string;
|
||||
id?: string;
|
||||
};
|
||||
user: {
|
||||
name: string;
|
||||
displayName: string;
|
||||
id: BufferSource;
|
||||
};
|
||||
pubKeyCredParams: {
|
||||
alg: number;
|
||||
// type: "public-key"; // not used
|
||||
}[];
|
||||
excludeList?: {
|
||||
id: BufferSource;
|
||||
transports?: ("ble" | "internal" | "nfc" | "usb")[];
|
||||
// type: "public-key"; // not used
|
||||
}[];
|
||||
extensions?: {
|
||||
appid?: string;
|
||||
appidExclude?: string;
|
||||
credProps?: boolean;
|
||||
uvm?: boolean;
|
||||
};
|
||||
options?: {
|
||||
rk?: boolean;
|
||||
uv?: boolean;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user