Shorten name
This commit is contained in:
parent
026b2118a4
commit
fd3027cea9
|
@ -12,7 +12,7 @@ export namespace passwords {
|
||||||
export function setPassword(service: string, account: string, password: string): Promise<void>
|
export function setPassword(service: string, account: string, password: string): Promise<void>
|
||||||
/** Delete the stored password from the keychain. */
|
/** Delete the stored password from the keychain. */
|
||||||
export function deletePassword(service: string, account: string): Promise<void>
|
export function deletePassword(service: string, account: string): Promise<void>
|
||||||
export function osSupportsSecuredStorage(): boolean
|
export function osSupport(): boolean
|
||||||
}
|
}
|
||||||
export namespace biometrics {
|
export namespace biometrics {
|
||||||
export function prompt(hwnd: Buffer, message: string): Promise<boolean>
|
export function prompt(hwnd: Buffer, message: string): Promise<boolean>
|
||||||
|
|
|
@ -42,7 +42,7 @@ pub mod passwords {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[napi]
|
#[napi]
|
||||||
pub fn os_supports_secured_storage() -> bool {
|
pub fn os_support() -> bool {
|
||||||
super::password::has_password_management()
|
super::password::has_password_management()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,7 +179,7 @@ export class Main {
|
||||||
this.tokenService = new TokenService(
|
this.tokenService = new TokenService(
|
||||||
singleUserStateProvider,
|
singleUserStateProvider,
|
||||||
globalStateProvider,
|
globalStateProvider,
|
||||||
passwords.osSupportsSecuredStorage(),
|
passwords.osSupport(),
|
||||||
illegalSecureStorageService,
|
illegalSecureStorageService,
|
||||||
this.keyGenerationService,
|
this.keyGenerationService,
|
||||||
this.encryptService,
|
this.encryptService,
|
||||||
|
|
|
@ -19,8 +19,8 @@ export class DesktopCredentialStorageListener {
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
// Handle password management detection sync
|
// Handle password management detection sync
|
||||||
ipcMain.on("osSupportsSecuredStorage", (event) => {
|
ipcMain.on("osSupportsPasswords", (event) => {
|
||||||
event.returnValue = passwords.osSupportsSecuredStorage();
|
event.returnValue = passwords.osSupport();
|
||||||
});
|
});
|
||||||
ipcMain.handle("keytar", async (event: any, message: any) => {
|
ipcMain.handle("keytar", async (event: any, message: any) => {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -34,7 +34,7 @@ const passwords = {
|
||||||
ipcRenderer.invoke("keytar", { action: "setPassword", key, keySuffix, value }),
|
ipcRenderer.invoke("keytar", { action: "setPassword", key, keySuffix, value }),
|
||||||
delete: (key: string, keySuffix: string): Promise<void> =>
|
delete: (key: string, keySuffix: string): Promise<void> =>
|
||||||
ipcRenderer.invoke("keytar", { action: "deletePassword", key, keySuffix }),
|
ipcRenderer.invoke("keytar", { action: "deletePassword", key, keySuffix }),
|
||||||
osSupportsSecuredStorage: (): boolean => ipcRenderer.sendSync("osSupportsSecuredStorage"),
|
osSupport: (): boolean => ipcRenderer.sendSync("osSupportsPasswords"),
|
||||||
};
|
};
|
||||||
|
|
||||||
const biometric = {
|
const biometric = {
|
||||||
|
|
|
@ -142,7 +142,7 @@ export class ElectronPlatformUtilsService implements PlatformUtilsService {
|
||||||
}
|
}
|
||||||
|
|
||||||
supportsSecureStorage(): boolean {
|
supportsSecureStorage(): boolean {
|
||||||
return ipc.platform.passwords.osSupportsSecuredStorage();
|
return ipc.platform.passwords.osSupport();
|
||||||
}
|
}
|
||||||
|
|
||||||
getAutofillKeyboardShortcut(): Promise<string> {
|
getAutofillKeyboardShortcut(): Promise<string> {
|
||||||
|
|
Loading…
Reference in New Issue