Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Commit

Permalink
Request attestation if selected (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpiper authored May 30, 2018
1 parent 300f947 commit fe9da5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion u2f-gae-demo/src/soy/main.soy
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

<div id='sidebar'>
<div id="addToken" style="-webkit-user-select: none;">Register U2F Authenticator</div>
<label><input id="reregistration" type="checkbox" />allow re-registration</label>
<label><input id="reregistration" type="checkbox" />allow re-registration</label>
<label><input id="req-attestation" type="checkbox" />request attestation</label>
<div id="testAuth" style="-webkit-user-select: none;">Test Authentication</div>
<div id="downloadCrx">
<a href="https://chrome.google.com/webstore/detail/fido-u2f-universal-2nd-fa/pfboblefjcgdjicmnffhdgionmgcdmne">install the Chrome extension</a>
Expand Down
4 changes: 4 additions & 0 deletions u2f-gae-demo/war/js/u2fdemo.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ function sendBeginEnrollRequest() {
.done(function(beginEnrollResponse) {
console.log(beginEnrollResponse);
showMessage("please touch the token");
// Request attestation if needed
if (document.getElementById("req-attestation").checked) {
beginEnrollResponse.registerRequests.attestation = 'direct';
}
u2f.register(
beginEnrollResponse.appId,
[beginEnrollResponse.registerRequests],
Expand Down

0 comments on commit fe9da5c

Please sign in to comment.