mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-19 07:35:48 +02:00
c62f5287cd
* Initial work on windows hello support * Switch to use windows.security.credentials.ui UserConsentVerifier * Fix linting warnings * Remove unessesary supportsBiometric from lock screen * Rename biometric.main to windows.biometric.main. Add abstraction for biometric. * Add support for dynamic biometric text. * Add untested darwin implementation * Rename fingerprintUnlock to biometric * Add new functions to cliPlatformUtils.service.ts. * Hide login if biometric is not supported * Export default for biometric.*.main.ts * Remove @nodert-win10-rs4/windows.security.credentials * Add build requirements to readme * Auto prompt biometric when starting the application. * Ensure we support biometric before trying to auto prompt. * Fix review comments and linting errors
105 lines
2.7 KiB
TypeScript
105 lines
2.7 KiB
TypeScript
declare function escape(s: string): string;
|
|
declare function unescape(s: string): string;
|
|
declare module 'duo_web_sdk';
|
|
|
|
/* tslint:disable */
|
|
declare module '@nodert-win10-rs4/windows.security.credentials.ui' {
|
|
export enum AuthenticationProtocol {
|
|
basic,
|
|
digest,
|
|
ntlm,
|
|
kerberos,
|
|
negotiate,
|
|
credSsp,
|
|
custom,
|
|
}
|
|
|
|
export enum CredentialSaveOption {
|
|
unselected,
|
|
selected,
|
|
hidden,
|
|
}
|
|
|
|
export enum UserConsentVerifierAvailability {
|
|
available,
|
|
deviceNotPresent,
|
|
notConfiguredForUser,
|
|
disabledByPolicy,
|
|
deviceBusy,
|
|
}
|
|
|
|
export enum UserConsentVerificationResult {
|
|
verified,
|
|
deviceNotPresent,
|
|
notConfiguredForUser,
|
|
disabledByPolicy,
|
|
deviceBusy,
|
|
retriesExhausted,
|
|
canceled,
|
|
}
|
|
|
|
export class CredentialPickerOptions {
|
|
targetName: String;
|
|
previousCredential: Object;
|
|
message: String;
|
|
errorCode: Number;
|
|
customAuthenticationProtocol: String;
|
|
credentialSaveOption: CredentialSaveOption;
|
|
caption: String;
|
|
callerSavesCredential: Boolean;
|
|
authenticationProtocol: AuthenticationProtocol;
|
|
alwaysDisplayDialog: Boolean;
|
|
constructor();
|
|
}
|
|
|
|
export class CredentialPickerResults {
|
|
credential: Object;
|
|
credentialDomainName: String;
|
|
credentialPassword: String;
|
|
credentialSaveOption: CredentialSaveOption;
|
|
credentialSaved: Boolean;
|
|
credentialUserName: String;
|
|
errorCode: Number;
|
|
constructor();
|
|
}
|
|
|
|
export class CredentialPicker {
|
|
constructor();
|
|
|
|
static pickAsync(
|
|
options: CredentialPickerOptions,
|
|
callback: (error: Error, result: CredentialPickerResults) => void
|
|
): void;
|
|
static pickAsync(
|
|
targetName: String,
|
|
message: String,
|
|
callback: (error: Error, result: CredentialPickerResults) => void
|
|
): void;
|
|
static pickAsync(
|
|
targetName: String,
|
|
message: String,
|
|
caption: String,
|
|
callback: (error: Error, result: CredentialPickerResults) => void
|
|
): void;
|
|
}
|
|
|
|
export class UserConsentVerifier {
|
|
constructor();
|
|
|
|
static checkAvailabilityAsync(
|
|
callback: (
|
|
error: Error,
|
|
result: UserConsentVerifierAvailability
|
|
) => void
|
|
): void;
|
|
|
|
static requestVerificationAsync(
|
|
message: String,
|
|
callback: (
|
|
error: Error,
|
|
result: UserConsentVerificationResult
|
|
) => void
|
|
): void;
|
|
}
|
|
}
|