Commit d7795e08 authored by taco@waag.org's avatar taco@waag.org
Browse files

formatting

parent 0c45fd55
......@@ -10,8 +10,8 @@ function pop_normalize(raw){
//calls irma server specified in url
//to sign the message, using the (disclosed) attribute name
function pop_sign(url, attribute, normalized_message){
let options = {
let options = {
// Developer options
debugging: true,
......@@ -30,21 +30,21 @@ function pop_sign(url, attribute, normalized_message){
body: JSON.stringify({
"@context": "https://irma.app/ld/request/signature/v2",
"message" : normalized_message,
"disclose": [
[
[ attribute ]
]
]
})
"disclose": [
[
[ attribute ]
]
]
})
}
}
};
let irmaPopup = irma.newPopup(options);
//return the promise
return irmaPopup.start().then(result => {
//strip and encode the signature
//strip and encode the signature
var signature = result.signature;
signature.message = undefined;
return btoa(JSON.stringify(signature));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment