@@ -103,14 +103,8 @@ public async Task TestFido2AssertionAsync()
103103 var options = JsonConvert . DeserializeObject < CredentialCreateOptions > ( File . ReadAllText ( "./AttestationNoneOptions.json" ) ) ;
104104 var response = JsonConvert . DeserializeObject < AuthenticatorAttestationRawResponse > ( File . ReadAllText ( "./AttestationNoneResponse.json" ) ) ;
105105
106- var fido2 = new Fido2NetLib . Fido2 ( new Fido2NetLib . Fido2 . Configuration ( )
107- {
108- ServerDomain = "localhost" ,
109- Origin = "https://localhost:44329" ,
110- } ) ;
111-
112106 var o = AuthenticatorAttestationResponse . Parse ( response ) ;
113- await o . VerifyAsync ( options , "https://localhost:44329" , ( x ) => Task . FromResult ( true ) , null ) ;
107+ await o . VerifyAsync ( options , "https://localhost:44329" , ( x ) => Task . FromResult ( true ) , null , null ) ;
114108
115109 var credId = "F1-3C-7F-08-3C-A2-29-E0-B4-03-E8-87-34-6E-FC-7F-98-53-10-3A-30-91-75-67-39-7A-D1-D8-AF-87-04-61-87-EF-95-31-85-60-F3-5A-1A-2A-CF-7D-B0-1D-06-B9-69-F9-AB-F4-EC-F3-07-3E-CF-0F-71-E8-84-E8-41-20" ;
116110 var allowedCreds = new List < PublicKeyCredentialDescriptor > ( ) {
@@ -142,9 +136,8 @@ public async Task TestParsingAsync()
142136
143137 Assert . NotNull ( jsonPost ) ;
144138
145- var fido2 = new Fido2NetLib . Fido2 ( new Fido2NetLib . Fido2 . Configuration ( ) ) ;
146139 var o = AuthenticatorAttestationResponse . Parse ( jsonPost ) ;
147- await o . VerifyAsync ( options , "https://localhost:44329" , isCredentialIdUniqueToUser : ( x ) => Task . FromResult ( true ) , requestTokenBindingId : null ) ;
140+ await o . VerifyAsync ( options , "https://localhost:44329" , ( x ) => Task . FromResult ( true ) , null , null ) ;
148141 }
149142
150143 [ Fact ]
@@ -162,58 +155,52 @@ public async Task TestU2FAttestationAsync()
162155 {
163156 var jsonPost = JsonConvert . DeserializeObject < AuthenticatorAttestationRawResponse > ( File . ReadAllText ( "./attestationResultsU2F.json" ) ) ;
164157 var options = JsonConvert . DeserializeObject < CredentialCreateOptions > ( File . ReadAllText ( "./attestationOptionsU2F.json" ) ) ;
165- var fido2 = new Fido2NetLib . Fido2 ( new Fido2NetLib . Fido2 . Configuration ( ) ) ;
166158 var o = AuthenticatorAttestationResponse . Parse ( jsonPost ) ;
167- await o . VerifyAsync ( options , "https://localhost:44329" , ( x ) => Task . FromResult ( true ) , null ) ;
159+ await o . VerifyAsync ( options , "https://localhost:44329" , ( x ) => Task . FromResult ( true ) , null , null ) ;
168160 byte [ ] ad = o . AttestationObject . AuthData ;
169161 }
170162 [ Fact ]
171163 public async Task TestPackedAttestationAsync ( )
172164 {
173165 var jsonPost = JsonConvert . DeserializeObject < AuthenticatorAttestationRawResponse > ( File . ReadAllText ( "./attestationResultsPacked.json" ) ) ;
174166 var options = JsonConvert . DeserializeObject < CredentialCreateOptions > ( File . ReadAllText ( "./attestationOptionsPacked.json" ) ) ;
175- var fido2 = new Fido2NetLib . Fido2 ( new Fido2NetLib . Fido2 . Configuration ( ) ) ;
176167 var o = AuthenticatorAttestationResponse . Parse ( jsonPost ) ;
177- await o . VerifyAsync ( options , "https://localhost:44329" , ( x ) => Task . FromResult ( true ) , null ) ;
168+ await o . VerifyAsync ( options , "https://localhost:44329" , ( x ) => Task . FromResult ( true ) , null , null ) ;
178169 byte [ ] ad = o . AttestationObject . AuthData ;
179170 }
180171 [ Fact ]
181172 public async Task TestNoneAttestationAsync ( )
182173 {
183174 var jsonPost = JsonConvert . DeserializeObject < AuthenticatorAttestationRawResponse > ( File . ReadAllText ( "./attestationResultsNone.json" ) ) ;
184175 var options = JsonConvert . DeserializeObject < CredentialCreateOptions > ( File . ReadAllText ( "./attestationOptionsNone.json" ) ) ;
185- var fido2 = new Fido2NetLib . Fido2 ( new Fido2NetLib . Fido2 . Configuration ( ) ) ;
186176 var o = AuthenticatorAttestationResponse . Parse ( jsonPost ) ;
187- await o . VerifyAsync ( options , "https://localhost:44329" , ( x ) => Task . FromResult ( true ) , null ) ;
177+ await o . VerifyAsync ( options , "https://localhost:44329" , ( x ) => Task . FromResult ( true ) , null , null ) ;
188178 }
189179 [ Fact ]
190180 public async Task TestTPMSHA256AttestationAsync ( )
191181 {
192182 var jsonPost = JsonConvert . DeserializeObject < AuthenticatorAttestationRawResponse > ( File . ReadAllText ( "./attestationTPMSHA256Response.json" ) ) ;
193183 var options = JsonConvert . DeserializeObject < CredentialCreateOptions > ( File . ReadAllText ( "./attestationTPMSHA256Options.json" ) ) ;
194- var fido2 = new Fido2NetLib . Fido2 ( new Fido2NetLib . Fido2 . Configuration ( ) ) ;
195184 var o = AuthenticatorAttestationResponse . Parse ( jsonPost ) ;
196- await o . VerifyAsync ( options , "https://localhost:44329" , ( x ) => Task . FromResult ( true ) , null ) ;
185+ await o . VerifyAsync ( options , "https://localhost:44329" , ( x ) => Task . FromResult ( true ) , null , null ) ;
197186 byte [ ] ad = o . AttestationObject . AuthData ;
198187 }
199188 [ Fact ]
200189 public async Task TestTPMSHA1AttestationAsync ( )
201190 {
202191 var jsonPost = JsonConvert . DeserializeObject < AuthenticatorAttestationRawResponse > ( File . ReadAllText ( "./attestationTPMSHA1Response.json" ) ) ;
203192 var options = JsonConvert . DeserializeObject < CredentialCreateOptions > ( File . ReadAllText ( "./attestationTPMSHA1Options.json" ) ) ;
204- var fido2 = new Fido2NetLib . Fido2 ( new Fido2NetLib . Fido2 . Configuration ( ) ) ;
205193 var o = AuthenticatorAttestationResponse . Parse ( jsonPost ) ;
206- await o . VerifyAsync ( options , "https://localhost:44329" , ( x ) => Task . FromResult ( true ) , null ) ;
194+ await o . VerifyAsync ( options , "https://localhost:44329" , ( x ) => Task . FromResult ( true ) , null , null ) ;
207195 byte [ ] ad = o . AttestationObject . AuthData ;
208196 }
209197 [ Fact ]
210198 public async Task TestAndroidKeyAttestationAsync ( )
211199 {
212200 var jsonPost = JsonConvert . DeserializeObject < AuthenticatorAttestationRawResponse > ( File . ReadAllText ( "./attestationAndroidKeyResponse.json" ) ) ;
213201 var options = JsonConvert . DeserializeObject < CredentialCreateOptions > ( File . ReadAllText ( "./attestationAndroidKeyOptions.json" ) ) ;
214- var fido2 = new Fido2NetLib . Fido2 ( new Fido2NetLib . Fido2 . Configuration ( ) ) ;
215202 var o = AuthenticatorAttestationResponse . Parse ( jsonPost ) ;
216- await o . VerifyAsync ( options , "https://localhost:44329" , ( x ) => Task . FromResult ( true ) , null ) ;
203+ await o . VerifyAsync ( options , "https://localhost:44329" , ( x ) => Task . FromResult ( true ) , null , null ) ;
217204 byte [ ] ad = o . AttestationObject . AuthData ;
218205 }
219206 //public void TestHasCorrentAAguid()
0 commit comments