mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Bug 1142730 - Show client cert in WebIDE auth dialog. r=past
--HG-- extra : transplant_source : %B7Q%A2%40%CD%F13%88%E1%AD%8B%CD%3A%AFR%F8%D5%98E%0A
This commit is contained in:
parent
b56c43ff6c
commit
420c734fb3
@ -9,6 +9,8 @@ const { Services } = Cu.import("resource://gre/modules/Services.jsm");
|
||||
const { require } =
|
||||
Cu.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools;
|
||||
const QR = require("devtools/toolkit/qrcode/index");
|
||||
const PROPERTIES = "chrome://browser/locale/devtools/webide.properties";
|
||||
const Strings = Services.strings.createBundle(PROPERTIES);
|
||||
|
||||
window.addEventListener("load", function onLoad() {
|
||||
window.removeEventListener("load", onLoad);
|
||||
@ -31,6 +33,10 @@ function createQR(oob) {
|
||||
}
|
||||
|
||||
function createToken(oob) {
|
||||
let spacedCert = oob.sha256.replace(/:/g, " ").toLowerCase();
|
||||
let certText = Strings.formatStringFromName("wifi_auth_cert",
|
||||
[spacedCert], 1);
|
||||
document.querySelector("#cert").textContent = certText;
|
||||
let token = oob.sha256.replace(/:/g, "").toLowerCase() + oob.k;
|
||||
document.querySelector("#token pre").textContent = token;
|
||||
}
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
<h3 id="header">&wifi_auth_header;</h3>
|
||||
<div id="scan-request">&wifi_auth_scan_request;</div>
|
||||
<div id="cert"></div>
|
||||
|
||||
<div id="qr-code">
|
||||
<div id="qr-code-wrapper">
|
||||
|
@ -77,3 +77,9 @@ status_unknown=UNKNOWN
|
||||
|
||||
# Device preferences and settings
|
||||
device_reset_default=Reset to default
|
||||
|
||||
# WiFi Auth
|
||||
# LOCALIZATION NOTE (wifi_auth_cert): Part of the dialog that instructs the
|
||||
# user to transfer an authentication token to the server.
|
||||
# %1$S: The client's cert fingerprint
|
||||
wifi_auth_cert=My Cert: %1$S
|
||||
|
Loading…
Reference in New Issue
Block a user