electron/lib/browser/api
arno renevier 81bdba67ec
feat: Implement password delegate for NSS (#41205)
* feat: Implement password delegate for NSS (#41188)

Introduce an app event client-certificate-request-password. It allows
the user to display a UI to prompt for the password.

An alternative would have been to implement a class similar to
CryptoModulePasswordDialogView, to provide the UI. This might have been
simpler for the user, comparing to letting them implement the UI. But it
seems like electron does not have an i18n framework, so it's not
possible to provide a locale aware UI.

* fix lint:markdown error

* address review comments

* use a trampoline handler in JS. The api exposed is now app.setClientCertRequestPasswordHandler
* use properties on the Event object instead of positional parameters
* remove ChromeNSSCryptoModuleDelegate::OnPassword in favor of args->GetNext(&password_)

* address review comments second round

- backslash escape parametrized TypeScript
- rename hostName param to hostname
- use base::ScopedAllowBaseSyncPrimitivesForTesting
- and then, rename ChromeNSSCryptoModuleDelegate to ElectronNSSCryptoModuleDelegate

* Update docs/api/app.md

Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>

* Update docs/api/app.md

Co-authored-by: Erick Zhao <erick@hotmail.ca>

---------

Co-authored-by: Arno Renevier <arnaud@switchboard.app>
Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2024-07-17 09:48:03 -04:00
..
auto-updater fix: on error, reset spawnedProcess (#41033) 2024-01-24 16:45:08 -06:00
exports
views
app.ts feat: Implement password delegate for NSS (#41205) 2024-07-17 09:48:03 -04:00
auto-updater.ts
base-window.ts feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
browser-view.ts fix: potentially closed webContents in BrowserView (#42633) 2024-07-08 12:13:53 +02:00
browser-window.ts fix: potentially closed webContents in BrowserView (#42633) 2024-07-08 12:13:53 +02:00
clipboard.ts refactor: split clipboard module implementation for browser / renderer (#38429) 2023-05-25 20:36:12 +09:00
content-tracing.ts
crash-reporter.ts fix: make sure classes in lib correctly implement Electron interfaces (#40291) 2023-10-25 14:02:15 -04:00
desktop-capturer.ts refactor: use optional chaining / nullish coalescing operator (#35217) 2022-08-08 10:11:04 +02:00
dialog.ts fix: dialogs should work with BaseWindows internally (#42315) 2024-05-31 12:04:22 +02:00
global-shortcut.ts
in-app-purchase.ts feat: added username to IAP purchaseProduct method (#35902) 2022-12-12 10:11:48 -08:00
ipc-main.ts feat: add WebContents.ipc (#34959) 2022-08-03 16:55:12 -07:00
menu-item-roles.ts refactor: replace Object.prototype.hasOwnProperty() with Object.hasOwn() (#38929) 2023-06-27 16:57:33 -04:00
menu-item.ts refactor: simplify events (#37099) 2023-02-13 13:39:18 -08:00
menu-utils.ts refactor: replace .forEach() with for-of (#39691) 2023-08-31 23:36:43 +09:00
menu.ts refactor: replace .forEach() with for-of (#39691) 2023-08-31 23:36:43 +09:00
message-channel.ts fix: make sure classes in lib correctly implement Electron interfaces (#40291) 2023-10-25 14:02:15 -04:00
module-list.ts feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
native-theme.ts chore: move main process only accessible API bindings away from common (#34634) 2022-06-21 16:34:56 +09:00
net-fetch.ts feat: add net module to utility process (#40017) 2024-01-04 16:20:37 -05:00
net-log.ts
net.ts feat: add net module to utility process (#40017) 2024-01-04 16:20:37 -05:00
notification.ts chore: move main process only accessible API bindings away from common (#34634) 2022-06-21 16:34:56 +09:00
power-monitor.ts fix: make sure classes in lib correctly implement Electron interfaces (#40291) 2023-10-25 14:02:15 -04:00
power-save-blocker.ts
protocol.ts fix: data corruption in protocol.handle (#41894) 2024-04-22 13:40:01 -07:00
push-notifications.ts feat: Enable APNS registration + notification delivery in macOS apps (#33574) 2022-07-12 08:38:49 -07:00
safe-storage.ts feat: add electron.safeStorage encryption API (#30020) 2021-08-05 15:12:54 -07:00
screen.ts chore: move main process only accessible API bindings away from common (#34634) 2022-06-21 16:34:56 +09:00
session.ts feat: add net module to utility process (#40017) 2024-01-04 16:20:37 -05:00
share-menu.ts fix: make sure classes in lib correctly implement Electron interfaces (#40291) 2023-10-25 14:02:15 -04:00
system-preferences.ts chore: remove deprecated systemPreferences APIs (#39696) 2023-09-11 11:34:13 -04:00
touch-bar.ts refactor: replace .forEach() with for-of (#39691) 2023-08-31 23:36:43 +09:00
tray.ts
utility-process.ts fix: make sure classes in lib correctly implement Electron interfaces (#40291) 2023-10-25 14:02:15 -04:00
view.ts feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
web-contents-view.ts
web-contents.ts feat: duplicate navigation related APIs to contents.navigationHistory (#41752) 2024-06-05 09:34:47 -07:00
web-frame-main.ts refactor: use TypeError instead of generic Error when appropriate (#39209) 2023-07-25 12:08:46 -04:00