no-acme #10
7
app.js
7
app.js
|
@ -144,18 +144,17 @@
|
||||||
var msgArr = msg.split(".")
|
var msgArr = msg.split(".")
|
||||||
var protected64 = msgArr[0]
|
var protected64 = msgArr[0]
|
||||||
var payload64 = msgArr[1]
|
var payload64 = msgArr[1]
|
||||||
Keypairs._sign(opts, msg).then(function (buf) {
|
var signature = msgArr[2]
|
||||||
var signedMsg = {
|
var signedMsg = {
|
||||||
protected: protected64
|
protected: protected64
|
||||||
, payload: payload64
|
, payload: payload64
|
||||||
, signature: Enc.bufToUrlBase64(buf)
|
, signature
|
||||||
};
|
};
|
||||||
$('.js-jws').innerText = JSON.stringify(signedMsg);
|
$('.js-jws').innerText = JSON.stringify(signedMsg, null, 2);
|
||||||
$('.js-toc-jws').hidden = false;
|
$('.js-toc-jws').hidden = false;
|
||||||
$('.js-pem-loading').hidden = true;
|
$('.js-pem-loading').hidden = true;
|
||||||
$$('input').map(function ($el) { $el.disabled = false; });
|
$$('input').map(function ($el) { $el.disabled = false; });
|
||||||
$$('button').map(function ($el) { $el.disabled = false; });
|
$$('button').map(function ($el) { $el.disabled = false; });
|
||||||
});
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// jws = jwk.sign(payload)
|
// jws = jwk.sign(payload)
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
height: 10em;
|
height: 10em;
|
||||||
}
|
}
|
||||||
/* need to word wrap the binary no space der */
|
/* need to word wrap the binary no space der */
|
||||||
.js-der-public, .js-der-private{
|
.js-der-public, .js-der-private, .js-jwt{
|
||||||
white-space: pre-wrap; /* CSS3 */
|
white-space: pre-wrap; /* CSS3 */
|
||||||
white-space: -moz-pre-wrap; /* Firefox */
|
white-space: -moz-pre-wrap; /* Firefox */
|
||||||
white-space: -pre-wrap; /* Opera <7 */
|
white-space: -pre-wrap; /* Opera <7 */
|
||||||
|
|
Loading…
Reference in New Issue