Move webauthn to panels/webauthn

R=aerotwist@chromium.org

Bug: 1187573
Change-Id: Iaa529a9139886ffc1eecca449ad15d67564a99b9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2831982
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
This commit is contained in:
Tim van der Lippe
2021-04-20 10:19:53 +00:00
committed by Commit Bot
parent f92c6d936c
commit 59f258ec57
19 changed files with 232 additions and 224 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ non_autostart_non_remote_modules = [
"ui/legacy/components/text_editor/text_editor_module.js",
"panels/timeline/timeline_module.js",
"panels/web_audio/web_audio_module.js",
"webauthn/webauthn_module.js",
"panels/webauthn/webauthn_module.js",
"workspace_diff/workspace_diff_module.js",
"emulated_devices/emulated_devices_module.js",
]
+2 -2
View File
@@ -364,8 +364,8 @@ all_devtools_files = [
"front_end/panels/web_audio/audioContextSelector.css",
"front_end/panels/web_audio/module.json",
"front_end/panels/web_audio/webAudio.css",
"front_end/webauthn/module.json",
"front_end/webauthn/webauthnPane.css",
"front_end/panels/webauthn/module.json",
"front_end/panels/webauthn/webauthnPane.css",
"front_end/models/recorder/module.json",
"front_end/worker_main/module.json",
"front_end/workspace_diff/module.json",
+1 -1
View File
@@ -556,6 +556,7 @@ all_typescript_module_sources = [
"panels/web_audio/graph_visualizer/GraphView.js",
"panels/web_audio/graph_visualizer/NodeRendererUtility.js",
"panels/web_audio/graph_visualizer/NodeView.js",
"panels/webauthn/WebauthnPane.js",
"third_party/acorn-loose/package/dist/acorn-loose.mjs",
"third_party/acorn/package/dist/acorn.mjs",
"third_party/chromium/client-variations/ClientVariations.js",
@@ -832,7 +833,6 @@ all_typescript_module_sources = [
"ui/legacy/utils/measured-scrollbar-width.js",
"ui/legacy/utils/register-custom-element.js",
"ui/legacy/utils/utils.js",
"webauthn/WebauthnPane.js",
"worker_main/WorkerMain.js",
"workspace_diff/WorkspaceDiff.js",
]
+4 -4
View File
@@ -394,6 +394,9 @@ grd_files_release_sources = [
"front_end/panels/web_audio/web_audio-meta.js",
"front_end/panels/web_audio/web_audio.js",
"front_end/panels/web_audio/web_audio_module.js",
"front_end/panels/webauthn/webauthn-meta.js",
"front_end/panels/webauthn/webauthn.js",
"front_end/panels/webauthn/webauthn_module.js",
"front_end/third_party/acorn/acorn.js",
"front_end/third_party/chromium/client-variations/client-variations.js",
"front_end/third_party/diff/diff-legacy.js",
@@ -451,9 +454,6 @@ grd_files_release_sources = [
"front_end/ui/legacy/legacy.js",
"front_end/ui/legacy/theme_support/theme_support.js",
"front_end/ui/legacy/utils/utils.js",
"front_end/webauthn/webauthn-meta.js",
"front_end/webauthn/webauthn.js",
"front_end/webauthn/webauthn_module.js",
"front_end/worker_app.html",
"front_end/worker_main/worker_main.js",
"front_end/workspace_diff/workspace_diff-legacy.js",
@@ -1011,6 +1011,7 @@ grd_files_debug_sources = [
"front_end/panels/web_audio/graph_visualizer/GraphView.js",
"front_end/panels/web_audio/graph_visualizer/NodeRendererUtility.js",
"front_end/panels/web_audio/graph_visualizer/NodeView.js",
"front_end/panels/webauthn/WebauthnPane.js",
"front_end/third_party/acorn-loose/package/dist/acorn-loose.mjs",
"front_end/third_party/acorn/package/dist/acorn.mjs",
"front_end/third_party/chromium/client-variations/ClientVariations.js",
@@ -1285,7 +1286,6 @@ grd_files_debug_sources = [
"front_end/ui/legacy/utils/inject-core-styles.js",
"front_end/ui/legacy/utils/measured-scrollbar-width.js",
"front_end/ui/legacy/utils/register-custom-element.js",
"front_end/webauthn/WebauthnPane.js",
"front_end/worker_main/WorkerMain.js",
"front_end/workspace_diff/WorkspaceDiff.js",
]
+2 -2
View File
@@ -166,6 +166,8 @@ devtools_module_entrypoint_sources = [
"panels/web_audio/web_audio-legacy.js",
"panels/web_audio/web_audio-meta.js",
"panels/web_audio/web_audio.js",
"panels/webauthn/webauthn-meta.js",
"panels/webauthn/webauthn.js",
"third_party/acorn/acorn.js",
"third_party/chromium/client-variations/client-variations.js",
"third_party/diff/diff-legacy.js",
@@ -213,8 +215,6 @@ devtools_module_entrypoint_sources = [
"ui/legacy/legacy.js",
"ui/legacy/theme_support/theme_support.js",
"ui/legacy/utils/utils.js",
"webauthn/webauthn-meta.js",
"webauthn/webauthn.js",
"worker_main/worker_main.js",
"workspace_diff/workspace_diff-legacy.js",
"workspace_diff/workspace_diff.js",
+93 -93
View File
@@ -10466,6 +10466,99 @@
"panels/web_audio/WebAudioView.ts | openAPageThatUsesWebAudioApiTo": {
"message": "Open a page that uses Web Audio API to start monitoring."
},
"panels/webauthn/webauthn-meta.ts | showWebauthn": {
"message": "Show WebAuthn"
},
"panels/webauthn/webauthn-meta.ts | webauthn": {
"message": "WebAuthn"
},
"panels/webauthn/WebauthnPane.ts | actions": {
"message": "Actions"
},
"panels/webauthn/WebauthnPane.ts | active": {
"message": "Active"
},
"panels/webauthn/WebauthnPane.ts | add": {
"message": "Add"
},
"panels/webauthn/WebauthnPane.ts | addAuthenticator": {
"message": "Add authenticator"
},
"panels/webauthn/WebauthnPane.ts | authenticatorS": {
"message": "Authenticator {PH1}"
},
"panels/webauthn/WebauthnPane.ts | credentials": {
"message": "Credentials"
},
"panels/webauthn/WebauthnPane.ts | editName": {
"message": "Edit name"
},
"panels/webauthn/WebauthnPane.ts | enableVirtualAuthenticator": {
"message": "Enable virtual authenticator environment"
},
"panels/webauthn/WebauthnPane.ts | export": {
"message": "Export"
},
"panels/webauthn/WebauthnPane.ts | id": {
"message": "ID"
},
"panels/webauthn/WebauthnPane.ts | isResident": {
"message": "Is Resident"
},
"panels/webauthn/WebauthnPane.ts | learnMore": {
"message": "Learn more"
},
"panels/webauthn/WebauthnPane.ts | newAuthenticator": {
"message": "New authenticator"
},
"panels/webauthn/WebauthnPane.ts | no": {
"message": "No"
},
"panels/webauthn/WebauthnPane.ts | noCredentialsTryCallingSFromYour": {
"message": "No credentials. Try calling {PH1} from your website."
},
"panels/webauthn/WebauthnPane.ts | privateKeypem": {
"message": "Private key.pem"
},
"panels/webauthn/WebauthnPane.ts | protocol": {
"message": "Protocol"
},
"panels/webauthn/WebauthnPane.ts | remove": {
"message": "Remove"
},
"panels/webauthn/WebauthnPane.ts | rpId": {
"message": "RP ID"
},
"panels/webauthn/WebauthnPane.ts | saveName": {
"message": "Save name"
},
"panels/webauthn/WebauthnPane.ts | setSAsTheActiveAuthenticator": {
"message": "Set {PH1} as the active authenticator"
},
"panels/webauthn/WebauthnPane.ts | signCount": {
"message": "Signature Count"
},
"panels/webauthn/WebauthnPane.ts | supportsResidentKeys": {
"message": "Supports resident keys"
},
"panels/webauthn/WebauthnPane.ts | supportsUserVerification": {
"message": "Supports user verification"
},
"panels/webauthn/WebauthnPane.ts | transport": {
"message": "Transport"
},
"panels/webauthn/WebauthnPane.ts | userHandle": {
"message": "User Handle"
},
"panels/webauthn/WebauthnPane.ts | useWebauthnForPhishingresistant": {
"message": "Use WebAuthn for phishing-resistant authentication"
},
"panels/webauthn/WebauthnPane.ts | uuid": {
"message": "UUID"
},
"panels/webauthn/WebauthnPane.ts | yes": {
"message": "Yes"
},
"ui/components/data_grid/DataGrid.ts | headerOptions": {
"message": "Header Options"
},
@@ -11327,99 +11420,6 @@
"ui/legacy/ViewManager.ts | sPanel": {
"message": "{PH1} panel"
},
"webauthn/webauthn-meta.ts | showWebauthn": {
"message": "Show WebAuthn"
},
"webauthn/webauthn-meta.ts | webauthn": {
"message": "WebAuthn"
},
"webauthn/WebauthnPane.ts | actions": {
"message": "Actions"
},
"webauthn/WebauthnPane.ts | active": {
"message": "Active"
},
"webauthn/WebauthnPane.ts | add": {
"message": "Add"
},
"webauthn/WebauthnPane.ts | addAuthenticator": {
"message": "Add authenticator"
},
"webauthn/WebauthnPane.ts | authenticatorS": {
"message": "Authenticator {PH1}"
},
"webauthn/WebauthnPane.ts | credentials": {
"message": "Credentials"
},
"webauthn/WebauthnPane.ts | editName": {
"message": "Edit name"
},
"webauthn/WebauthnPane.ts | enableVirtualAuthenticator": {
"message": "Enable virtual authenticator environment"
},
"webauthn/WebauthnPane.ts | export": {
"message": "Export"
},
"webauthn/WebauthnPane.ts | id": {
"message": "ID"
},
"webauthn/WebauthnPane.ts | isResident": {
"message": "Is Resident"
},
"webauthn/WebauthnPane.ts | learnMore": {
"message": "Learn more"
},
"webauthn/WebauthnPane.ts | newAuthenticator": {
"message": "New authenticator"
},
"webauthn/WebauthnPane.ts | no": {
"message": "No"
},
"webauthn/WebauthnPane.ts | noCredentialsTryCallingSFromYour": {
"message": "No credentials. Try calling {PH1} from your website."
},
"webauthn/WebauthnPane.ts | privateKeypem": {
"message": "Private key.pem"
},
"webauthn/WebauthnPane.ts | protocol": {
"message": "Protocol"
},
"webauthn/WebauthnPane.ts | remove": {
"message": "Remove"
},
"webauthn/WebauthnPane.ts | rpId": {
"message": "RP ID"
},
"webauthn/WebauthnPane.ts | saveName": {
"message": "Save name"
},
"webauthn/WebauthnPane.ts | setSAsTheActiveAuthenticator": {
"message": "Set {PH1} as the active authenticator"
},
"webauthn/WebauthnPane.ts | signCount": {
"message": "Signature Count"
},
"webauthn/WebauthnPane.ts | supportsResidentKeys": {
"message": "Supports resident keys"
},
"webauthn/WebauthnPane.ts | supportsUserVerification": {
"message": "Supports user verification"
},
"webauthn/WebauthnPane.ts | transport": {
"message": "Transport"
},
"webauthn/WebauthnPane.ts | userHandle": {
"message": "User Handle"
},
"webauthn/WebauthnPane.ts | useWebauthnForPhishingresistant": {
"message": "Use WebAuthn for phishing-resistant authentication"
},
"webauthn/WebauthnPane.ts | uuid": {
"message": "UUID"
},
"webauthn/WebauthnPane.ts | yes": {
"message": "Yes"
},
"worker_main/WorkerMain.ts | main": {
"message": "Main"
}
+93 -93
View File
@@ -10466,6 +10466,99 @@
"panels/web_audio/WebAudioView.ts | openAPageThatUsesWebAudioApiTo": {
"message": "Ôṕêń â ṕâǵê t́ĥát̂ úŝéŝ Ẃêb́ Âúd̂íô ÁP̂Í t̂ó ŝt́âŕt̂ ḿôńît́ôŕîńĝ."
},
"panels/webauthn/webauthn-meta.ts | showWebauthn": {
"message": "Ŝh́ôẃ Ŵéb̂Áût́ĥń"
},
"panels/webauthn/webauthn-meta.ts | webauthn": {
"message": "Ŵéb̂Áût́ĥń"
},
"panels/webauthn/WebauthnPane.ts | actions": {
"message": "Âćt̂íôńŝ"
},
"panels/webauthn/WebauthnPane.ts | active": {
"message": "Âćt̂ív̂é"
},
"panels/webauthn/WebauthnPane.ts | add": {
"message": "Âd́d̂"
},
"panels/webauthn/WebauthnPane.ts | addAuthenticator": {
"message": "Âd́d̂ áût́ĥén̂t́îćât́ôŕ"
},
"panels/webauthn/WebauthnPane.ts | authenticatorS": {
"message": "Âút̂h́êńt̂íĉát̂ór̂ {PH1}"
},
"panels/webauthn/WebauthnPane.ts | credentials": {
"message": "Ĉŕêd́êńt̂íâĺŝ"
},
"panels/webauthn/WebauthnPane.ts | editName": {
"message": "Êd́ît́ n̂ám̂é"
},
"panels/webauthn/WebauthnPane.ts | enableVirtualAuthenticator": {
"message": "Êńâb́l̂é v̂ír̂t́ûál̂ áût́ĥén̂t́îćât́ôŕ êńv̂ír̂ón̂ḿêńt̂"
},
"panels/webauthn/WebauthnPane.ts | export": {
"message": "Êx́p̂ór̂t́"
},
"panels/webauthn/WebauthnPane.ts | id": {
"message": "ÎD́"
},
"panels/webauthn/WebauthnPane.ts | isResident": {
"message": "Îś R̂éŝíd̂én̂t́"
},
"panels/webauthn/WebauthnPane.ts | learnMore": {
"message": "L̂éâŕn̂ ḿôŕê"
},
"panels/webauthn/WebauthnPane.ts | newAuthenticator": {
"message": "N̂éŵ áût́ĥén̂t́îćât́ôŕ"
},
"panels/webauthn/WebauthnPane.ts | no": {
"message": "N̂ó"
},
"panels/webauthn/WebauthnPane.ts | noCredentialsTryCallingSFromYour": {
"message": "N̂ó ĉŕêd́êńt̂íâĺŝ. T́r̂ý ĉál̂ĺîńĝ {PH1} f́r̂óm̂ ýôúr̂ ẃêb́ŝít̂é."
},
"panels/webauthn/WebauthnPane.ts | privateKeypem": {
"message": "P̂ŕîv́ât́ê ḱêý.p̂ém̂"
},
"panels/webauthn/WebauthnPane.ts | protocol": {
"message": "P̂ŕôt́ôćôĺ"
},
"panels/webauthn/WebauthnPane.ts | remove": {
"message": "R̂ém̂óv̂é"
},
"panels/webauthn/WebauthnPane.ts | rpId": {
"message": "R̂Ṕ ÎD́"
},
"panels/webauthn/WebauthnPane.ts | saveName": {
"message": "Ŝáv̂é n̂ám̂é"
},
"panels/webauthn/WebauthnPane.ts | setSAsTheActiveAuthenticator": {
"message": "Ŝét̂ {PH1} áŝ t́ĥé âćt̂ív̂é âút̂h́êńt̂íĉát̂ór̂"
},
"panels/webauthn/WebauthnPane.ts | signCount": {
"message": "Ŝíĝńât́ûŕê Ćôún̂t́"
},
"panels/webauthn/WebauthnPane.ts | supportsResidentKeys": {
"message": "Ŝúp̂ṕôŕt̂ś r̂éŝíd̂én̂t́ k̂éŷś"
},
"panels/webauthn/WebauthnPane.ts | supportsUserVerification": {
"message": "Ŝúp̂ṕôŕt̂ś ûśêŕ v̂ér̂íf̂íĉát̂íôń"
},
"panels/webauthn/WebauthnPane.ts | transport": {
"message": "T̂ŕâńŝṕôŕt̂"
},
"panels/webauthn/WebauthnPane.ts | userHandle": {
"message": "Ûśêŕ Ĥán̂d́l̂é"
},
"panels/webauthn/WebauthnPane.ts | useWebauthnForPhishingresistant": {
"message": "Ûśê Ẃêb́Âút̂h́n̂ f́ôŕ p̂h́îśĥín̂ǵ-r̂éŝíŝt́âńt̂ áût́ĥén̂t́îćât́îón̂"
},
"panels/webauthn/WebauthnPane.ts | uuid": {
"message": "ÛÚÎD́"
},
"panels/webauthn/WebauthnPane.ts | yes": {
"message": "Ŷéŝ"
},
"ui/components/data_grid/DataGrid.ts | headerOptions": {
"message": "Ĥéâd́êŕ Ôṕt̂íôńŝ"
},
@@ -11327,99 +11420,6 @@
"ui/legacy/ViewManager.ts | sPanel": {
"message": "{PH1} p̂án̂él̂"
},
"webauthn/webauthn-meta.ts | showWebauthn": {
"message": "Ŝh́ôẃ Ŵéb̂Áût́ĥń"
},
"webauthn/webauthn-meta.ts | webauthn": {
"message": "Ŵéb̂Áût́ĥń"
},
"webauthn/WebauthnPane.ts | actions": {
"message": "Âćt̂íôńŝ"
},
"webauthn/WebauthnPane.ts | active": {
"message": "Âćt̂ív̂é"
},
"webauthn/WebauthnPane.ts | add": {
"message": "Âd́d̂"
},
"webauthn/WebauthnPane.ts | addAuthenticator": {
"message": "Âd́d̂ áût́ĥén̂t́îćât́ôŕ"
},
"webauthn/WebauthnPane.ts | authenticatorS": {
"message": "Âút̂h́êńt̂íĉát̂ór̂ {PH1}"
},
"webauthn/WebauthnPane.ts | credentials": {
"message": "Ĉŕêd́êńt̂íâĺŝ"
},
"webauthn/WebauthnPane.ts | editName": {
"message": "Êd́ît́ n̂ám̂é"
},
"webauthn/WebauthnPane.ts | enableVirtualAuthenticator": {
"message": "Êńâb́l̂é v̂ír̂t́ûál̂ áût́ĥén̂t́îćât́ôŕ êńv̂ír̂ón̂ḿêńt̂"
},
"webauthn/WebauthnPane.ts | export": {
"message": "Êx́p̂ór̂t́"
},
"webauthn/WebauthnPane.ts | id": {
"message": "ÎD́"
},
"webauthn/WebauthnPane.ts | isResident": {
"message": "Îś R̂éŝíd̂én̂t́"
},
"webauthn/WebauthnPane.ts | learnMore": {
"message": "L̂éâŕn̂ ḿôŕê"
},
"webauthn/WebauthnPane.ts | newAuthenticator": {
"message": "N̂éŵ áût́ĥén̂t́îćât́ôŕ"
},
"webauthn/WebauthnPane.ts | no": {
"message": "N̂ó"
},
"webauthn/WebauthnPane.ts | noCredentialsTryCallingSFromYour": {
"message": "N̂ó ĉŕêd́êńt̂íâĺŝ. T́r̂ý ĉál̂ĺîńĝ {PH1} f́r̂óm̂ ýôúr̂ ẃêb́ŝít̂é."
},
"webauthn/WebauthnPane.ts | privateKeypem": {
"message": "P̂ŕîv́ât́ê ḱêý.p̂ém̂"
},
"webauthn/WebauthnPane.ts | protocol": {
"message": "P̂ŕôt́ôćôĺ"
},
"webauthn/WebauthnPane.ts | remove": {
"message": "R̂ém̂óv̂é"
},
"webauthn/WebauthnPane.ts | rpId": {
"message": "R̂Ṕ ÎD́"
},
"webauthn/WebauthnPane.ts | saveName": {
"message": "Ŝáv̂é n̂ám̂é"
},
"webauthn/WebauthnPane.ts | setSAsTheActiveAuthenticator": {
"message": "Ŝét̂ {PH1} áŝ t́ĥé âćt̂ív̂é âút̂h́êńt̂íĉát̂ór̂"
},
"webauthn/WebauthnPane.ts | signCount": {
"message": "Ŝíĝńât́ûŕê Ćôún̂t́"
},
"webauthn/WebauthnPane.ts | supportsResidentKeys": {
"message": "Ŝúp̂ṕôŕt̂ś r̂éŝíd̂én̂t́ k̂éŷś"
},
"webauthn/WebauthnPane.ts | supportsUserVerification": {
"message": "Ŝúp̂ṕôŕt̂ś ûśêŕ v̂ér̂íf̂íĉát̂íôń"
},
"webauthn/WebauthnPane.ts | transport": {
"message": "T̂ŕâńŝṕôŕt̂"
},
"webauthn/WebauthnPane.ts | userHandle": {
"message": "Ûśêŕ Ĥán̂d́l̂é"
},
"webauthn/WebauthnPane.ts | useWebauthnForPhishingresistant": {
"message": "Ûśê Ẃêb́Âút̂h́n̂ f́ôŕ p̂h́îśĥín̂ǵ-r̂éŝíŝt́âńt̂ áût́ĥén̂t́îćât́îón̂"
},
"webauthn/WebauthnPane.ts | uuid": {
"message": "ÛÚÎD́"
},
"webauthn/WebauthnPane.ts | yes": {
"message": "Ŷéŝ"
},
"worker_main/WorkerMain.ts | main": {
"message": "M̂áîń"
}
+1 -1
View File
@@ -29,7 +29,7 @@ devtools_entrypoint("devtools_app-meta-files") {
"../../panels/security:meta",
"../../panels/timeline:meta",
"../../panels/web_audio:meta",
"../../webauthn:meta",
"../../panels/webauthn:meta",
]
}
@@ -22,5 +22,5 @@ import '../../panels/mobile_throttling/mobile_throttling-meta.js';
import '../../panels/performance_monitor/performance_monitor-meta.js';
import '../../panels/timeline/timeline-meta.js';
import '../../panels/web_audio/web_audio-meta.js';
import '../../webauthn/webauthn-meta.js';
import '../../panels/webauthn/webauthn-meta.js';
import '../../panels/layer_viewer/layer_viewer-meta.js';
@@ -23,7 +23,7 @@
{ "name": "panels/security" },
{ "name": "panels/timeline" },
{ "name": "panels/web_audio" },
{ "name": "webauthn"},
{ "name": "panels/webauthn"},
{ "name": "panels/media" }
],
"extends": "shell"
@@ -2,19 +2,19 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("../../scripts/build/ninja/devtools_entrypoint.gni")
import("../../scripts/build/ninja/devtools_module.gni")
import("../../../scripts/build/ninja/devtools_entrypoint.gni")
import("../../../scripts/build/ninja/devtools_module.gni")
devtools_module("webauthn") {
sources = [ "WebauthnPane.ts" ]
deps = [
"../core/common:bundle",
"../core/host:bundle",
"../core/i18n:bundle",
"../core/sdk:bundle",
"../ui/legacy:bundle",
"../ui/legacy/components/data_grid:bundle",
"../../core/common:bundle",
"../../core/host:bundle",
"../../core/i18n:bundle",
"../../core/sdk:bundle",
"../../ui/legacy:bundle",
"../../ui/legacy/components/data_grid:bundle",
]
}
@@ -3,12 +3,12 @@
// found in the LICENSE file.
/* eslint-disable rulesdir/no_underscored_properties */
import * as Common from '../core/common/common.js';
import * as Host from '../core/host/host.js';
import * as i18n from '../core/i18n/i18n.js';
import * as SDK from '../core/sdk/sdk.js';
import * as DataGrid from '../ui/legacy/components/data_grid/data_grid.js';
import * as UI from '../ui/legacy/legacy.js';
import * as Common from '../../core/common/common.js';
import * as Host from '../../core/host/host.js';
import * as i18n from '../../core/i18n/i18n.js';
import * as SDK from '../../core/sdk/sdk.js';
import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
import * as UI from '../../ui/legacy/legacy.js';
const UIStrings = {
/**
@@ -132,7 +132,7 @@ const UIStrings = {
*/
setSAsTheActiveAuthenticator: 'Set {PH1} as the active authenticator',
};
const str_ = i18n.i18n.registerUIStrings('webauthn/WebauthnPane.ts', UIStrings);
const str_ = i18n.i18n.registerUIStrings('panels/webauthn/WebauthnPane.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
const TIMEOUT = 1000;
@@ -204,6 +204,14 @@ type AvailableAuthenticatorOptions = Protocol.WebAuthn.VirtualAuthenticatorOptio
let webauthnPaneImplInstance: WebauthnPaneImpl;
// We extrapolate this variable as otherwise git detects a private key, even though we
// perform string manipulation. If we extract the name, then the regex doesn't match
// and we can upload as expected.
const PRIVATE_NAME = 'PRIVATE';
const PRIVATE_KEY_HEADER = `-----BEGIN ${PRIVATE_NAME} KEY-----
`;
const PRIVATE_KEY_FOOTER = `-----END ${PRIVATE_NAME} KEY-----`;
export class WebauthnPaneImpl extends UI.Widget.VBox {
_enabled: boolean;
_activeAuthId: string|null;
@@ -230,7 +238,7 @@ export class WebauthnPaneImpl extends UI.Widget.VBox {
constructor() {
super(true);
this.registerRequiredCSS('webauthn/webauthnPane.css', {enableLegacyPatching: false});
this.registerRequiredCSS('panels/webauthn/webauthnPane.css', {enableLegacyPatching: false});
this.contentElement.classList.add('webauthn-pane');
this._enabled = false;
this._activeAuthId = null;
@@ -632,11 +640,11 @@ export class WebauthnPaneImpl extends UI.Widget.VBox {
}
_exportCredential(credential: Protocol.WebAuthn.Credential): void {
let pem = '-----BEGIN PRIVATE KEY-----\n';
let pem = PRIVATE_KEY_HEADER;
for (let i = 0; i < credential.privateKey.length; i += 64) {
pem += credential.privateKey.substring(i, i + 64) + '\n';
}
pem += '-----END PRIVATE KEY-----';
pem += PRIVATE_KEY_FOOTER;
const link = document.createElement('a');
link.download = i18nString(UIStrings.privateKeypem);
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import * as i18n from '../core/i18n/i18n.js';
import * as Root from '../core/root/root.js';
import * as UI from '../ui/legacy/legacy.js';
import * as i18n from '../../core/i18n/i18n.js';
import * as Root from '../../core/root/root.js';
import * as UI from '../../ui/legacy/legacy.js';
// eslint-disable-next-line rulesdir/es_modules_import
import type * as Webauthn from './webauthn.js';
@@ -19,7 +19,7 @@ const UIStrings = {
*/
showWebauthn: 'Show WebAuthn',
};
const str_ = i18n.i18n.registerUIStrings('webauthn/webauthn-meta.ts', UIStrings);
const str_ = i18n.i18n.registerUIStrings('panels/webauthn/webauthn-meta.ts', UIStrings);
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
let loadedWebauthnModule: (typeof Webauthn|undefined);
@@ -27,7 +27,7 @@ let loadedWebauthnModule: (typeof Webauthn|undefined);
async function loadWebauthnModule(): Promise<typeof Webauthn> {
if (!loadedWebauthnModule) {
// Side-effect import resources in module.json
await Root.Runtime.Runtime.instance().loadModulePromise('webauthn');
await Root.Runtime.Runtime.instance().loadModulePromise('panels/webauthn');
loadedWebauthnModule = await import('./webauthn.js');
}
return loadedWebauthnModule;
@@ -33,7 +33,7 @@ ts_library("missing_entrypoints") {
"../../../../front_end/panels/security:bundle",
"../../../../front_end/panels/settings:bundle",
"../../../../front_end/panels/web_audio:bundle",
"../../../../front_end/webauthn:bundle",
"../../../../front_end/panels/webauthn:bundle",
"../../../../front_end/worker_main:bundle",
"../helpers",
]
@@ -38,7 +38,7 @@ describeWithEnvironment('Imports entrypoints that are yet to be tested', () => {
await import('../../../../front_end/entrypoints/startup/startup.js');
await import('../../../../front_end/entrypoints/wasmparser_worker/wasmparser_worker.js');
await import('../../../../front_end/panels/web_audio/web_audio.js');
await import('../../../../front_end/webauthn/webauthn.js');
await import('../../../../front_end/panels/webauthn/webauthn.js');
await import('../../../../front_end/worker_main/worker_main.js');
});