Commit 5721cd0b authored by Ivar Derksen's avatar Ivar Derksen
Browse files

Make idin credential id configurable for testing

parent de858698
Pipeline #32883 passed with stage
in 52 seconds
......@@ -10,11 +10,15 @@ module.exports = function (grunt) {
if ( (typeof(grunt.option("language")) === "undefined") ) {
console.log("INFO: No language chosen, assuming nl");
}
if ( (typeof(grunt.option("idin_credential_id")) === "undefined") ) {
console.log("INFO: No idin_credential_id chosen, assuming pbdf.pbdf.idin");
}
var conf = {
idin_server_url: grunt.option("idin_server_url") || "<IDIN_SERVER_URL>",
irma_server_url: grunt.option("irma_server_url") || "<IRMA_SERVER_URL>",
language: grunt.option("language") || "nl",
idin_credential_id: grunt.option("idin_credential_id") || "pbdf.pbdf.idin",
};
conf.irma_server_url += "/api/v2";
......
......@@ -16,7 +16,7 @@ getSetupFromJson(function() {
function displayAttributes (creds) {
$.each(creds, function(i, cred) {
if (cred.credential === "pbdf.pbdf.idin"){
if (cred.credential === conf.idin_credential_id){
$.each(cred.attributes, function(key, value) {
addTableLine($('#idinTable'), strings.hasOwnProperty("attribute_" + key) ? strings["attribute_" + key] : key, value);
});
......
......@@ -2,7 +2,7 @@ getSetupFromJson(function() {
var success_fun = function(data) {
$("#result_status").html(strings.verify_success);
$("#result_header").html(strings.verify_result);
var bd = jwt_decode(data).attributes["pbdf.pbdf.idin.dateofbirth"];
var bd = jwt_decode(data).attributes[conf.idin_credential_id + ".dateofbirth"];
$("#token-content").html("<b>" + strings.verify_birthdate + "</b> " + bd);
//TODO: check for birthdate
}
......
Markdown is supported
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