Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irma_idin_webclient
Commits
a8df1eb5
Commit
a8df1eb5
authored
May 03, 2017
by
Fabian van den Broek
Browse files
birthdate verification option after successfull iDIN credential issueance
parent
9635b05c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/done.html
View file @
a8df1eb5
...
...
@@ -6,6 +6,14 @@
<link
href=
"bower_components/bootstrap/dist/css/bootstrap.min.css"
rel=
"stylesheet"
>
<script
type=
"text/javascript"
src=
"[IRMA_JS_URL]irma.js"
></script>
<script
type=
"text/javascript"
src=
"js/common.js"
></script>
<script
type=
"text/javascript"
src=
"js/iDIN-verify.js"
></script>
<script
type=
"text/javascript"
>
var
server
=
"
[IDIN_SERVER_URL]/api/v1/idin
"
;
</script>
<title>
iDIN Attributen uitgegeven
</title>
</head>
...
...
@@ -23,9 +31,16 @@
</p>
<p>
Je kunt ze nu gebruiken op iedere website die deze attributen accepteert.
Je kunt ze nu gebruiken op iedere website die deze attributen accepteert.
<br/>
Als je direct één van je nieuwe attributen wilt testen, druk dan op de onderstaande knop.
</p>
<button
id=
"verify_idin_bd_btn"
class=
"btn btn-primary"
>
Test Attributes
</button>
<h3
id=
"result_header"
></h3>
<h4
id=
"result_status"
></h4>
<p
id=
"token-content"
></p>
<a
href=
"https://privacybydesign.foundation/irma/"
>
Keer terug naar de Privacy by Design Foundation.
</a>
</div>
</div>
...
...
src/js/iDIN-verify.js
0 → 100644
View file @
a8df1eb5
$
(
function
()
{
var
success_fun
=
function
(
data
)
{
$
(
"
#result_status
"
).
html
(
"
Success!
"
);
$
(
"
#result_header
"
).
html
(
"
Resultaat
"
);
var
bd
=
jwt_decode
(
data
).
attributes
[
"
pbdf.pbdf.idinData.dateOfBirth
"
];
$
(
"
#token-content
"
).
html
(
"
<b>Uw geboortedatum is:</b>
"
+
bd
);
//TODO: check voor verjaardag
}
var
cancel_fun
=
function
(
data
)
{
$
(
"
#result_header
"
).
html
(
"
Resultaat
"
);
$
(
"
#result_status
"
).
html
(
"
Geannuleerd!
"
);
}
var
error_fun
=
function
(
data
)
{
console
.
log
(
"
De verificatie is niet gelukt!
"
);
console
.
log
(
"
Error data:
"
,
data
);
$
(
"
#result_header
"
).
html
(
"
Resultaat
"
);
$
(
"
#result_status
"
).
html
(
"
Failure!
"
);
}
$
(
"
#verify_idin_bd_btn
"
).
on
(
"
click
"
,
function
()
{
$
(
"
#result_header
"
).
text
(
""
);
$
(
"
#result_status
"
).
text
(
""
);
$
(
"
#token-content
"
).
text
(
""
);
$
.
ajax
({
type
:
"
GET
"
,
url
:
server
+
"
/verify
"
,
success
:
function
(
data
)
{
IRMA
.
verify
(
data
,
success_fun
,
cancel_fun
,
error_fun
);
},
error
:
showError
,
});
IRMA
.
verify
(
jwt
,
success_fun
,
error_fun
);
});
});
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment