Exemplo n.º 1
0
        public void ShouldAddNonResidentCredential()
        {
            CreateRKDisabledCTAP2Authenticator();
            byte[]     credentialId = { 1, 2, 3, 4 };
            Credential credential   = Credential.CreateNonResidentCredential(
                credentialId, "localhost", base64EncodedPK, /*signCount=*/ 0);

            webDriver.AddCredential(credential);

            List <int> id = new List <int>();

            id.Add(1);
            id.Add(2);
            id.Add(3);
            id.Add(4);

            // Attempt to use the credential to generate an assertion.
            object response = GetAssertionFor(id);

            Assert.AreEqual("OK", ((Dictionary <string, object>)response)["status"]);
        }