tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

getcredential-rk-passing.https.html (1634B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>WebAuthn credential.get() Resident Key Passing Tests</title>
      4 <meta name="timeout" content="long">
      5 <link rel="help" href="hhttps://w3c.github.io/webauthn/#resident-credential">
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <script src="/resources/testdriver.js"></script>
      9 <script src="/resources/testdriver-vendor.js"></script>
     10 <script src=helpers.js></script>
     11 <body></body>
     12 <script>
     13 standardSetup(function() {
     14    "use strict";
     15 
     16    // create a resident key credential
     17    var credPromise = createCredential({
     18        options: {
     19            publicKey: {
     20                authenticatorSelection: {
     21                    requireResidentKey: true,
     22                }
     23            }
     24        }
     25    });
     26 
     27    // empty allowCredential should find the requireResidentKey: true credential
     28    new GetCredentialsTest({path: "options.publicKey.allowCredentials", value: []})
     29        .addCredential(credPromise)
     30        .setIsResidentKeyTest(true)
     31        .runTest("empty allowCredentials");
     32 
     33    // undefined allowCredential should be equivalent to empty
     34    new GetCredentialsTest({path: "options.publicKey.allowCredentials", value: undefined})
     35        .addCredential(credPromise)
     36        .setIsResidentKeyTest(true)
     37        .runTest("undefined allowCredentials");
     38 }, {
     39    // browsers may not allow resident key credential creation without uv
     40    protocol: "ctap2",
     41    hasResidentKey: true,
     42    hasUserVerification: true,
     43    isUserVerified: true,
     44 });
     45 
     46 /* JSHINT */
     47 /* globals standardSetup, GetCredentialsTest, createCredential */
     48 </script>