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

Request attestation if selected #173

Merged
merged 1 commit into from
May 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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