|
37 | 37 | context "when everything's in place" do |
38 | 38 | context "when there is a single origin" do |
39 | 39 | before do |
40 | | - WebAuthn.configuration.origin = origin |
| 40 | + WebAuthn.configuration.allowed_origins = [origin] |
41 | 41 | end |
42 | 42 |
|
43 | 43 | it_behaves_like "a valid attestation response" |
|
131 | 131 |
|
132 | 132 | before do |
133 | 133 | WebAuthn.configuration.attestation_root_certificates_finders = finder_for('feitian_ft_fido_0200.pem') |
134 | | - WebAuthn.configuration.origin = origin |
| 134 | + WebAuthn.configuration.allowed_origins = [origin] |
135 | 135 | end |
136 | 136 |
|
137 | 137 | it_behaves_like "a valid attestation response" |
|
209 | 209 | end |
210 | 210 |
|
211 | 211 | before do |
212 | | - WebAuthn.configuration.origin = origin |
| 212 | + WebAuthn.configuration.allowed_origins = [origin] |
213 | 213 | end |
214 | 214 |
|
215 | 215 | it_behaves_like "a valid attestation response" |
|
250 | 250 |
|
251 | 251 | before do |
252 | 252 | WebAuthn.configuration.attestation_root_certificates_finders = finder_for('yubico_u2f_root.pem') |
253 | | - WebAuthn.configuration.origin = origin |
| 253 | + WebAuthn.configuration.allowed_origins = [origin] |
254 | 254 | end |
255 | 255 |
|
256 | 256 | it_behaves_like "a valid attestation response" |
|
286 | 286 | end |
287 | 287 |
|
288 | 288 | before do |
289 | | - WebAuthn.configuration.origin = origin |
| 289 | + WebAuthn.configuration.allowed_origins = [origin] |
290 | 290 | WebAuthn.configure do |config| |
291 | 291 | config.algorithms.concat(%w(RS1)) |
292 | 292 | end |
|
347 | 347 | end |
348 | 348 |
|
349 | 349 | before do |
350 | | - WebAuthn.configuration.origin = origin |
| 350 | + WebAuthn.configuration.allowed_origins = [origin] |
351 | 351 | allow(attestation_response.attestation_statement).to receive(:time).and_return(time) |
352 | 352 | end |
353 | 353 |
|
|
391 | 391 | let(:origin) { seeds[:android_key_direct][:origin] } |
392 | 392 |
|
393 | 393 | before do |
394 | | - WebAuthn.configuration.origin = origin |
| 394 | + WebAuthn.configuration.allowed_origins = [origin] |
395 | 395 | end |
396 | 396 |
|
397 | 397 | it_behaves_like "a valid attestation response" |
|
481 | 481 | end |
482 | 482 |
|
483 | 483 | before do |
484 | | - WebAuthn.configuration.origin = origin |
| 484 | + WebAuthn.configuration.allowed_origins = [origin] |
485 | 485 |
|
486 | 486 | # Apple credential certificate expires after 3 days apparently. |
487 | 487 | # Seed data was obtained 22nd Feb 2021, so we are simulating validation within that 3 day timeframe |
|
504 | 504 |
|
505 | 505 | context "when no client data received" do |
506 | 506 | before do |
507 | | - WebAuthn.configuration.origin = origin |
| 507 | + WebAuthn.configuration.allowed_origins = [origin] |
508 | 508 | end |
509 | 509 |
|
510 | 510 | it "returns user-friendly error if no client data received" do |
|
534 | 534 | end |
535 | 535 |
|
536 | 536 | before do |
537 | | - WebAuthn.configuration.origin = origin |
| 537 | + WebAuthn.configuration.allowed_origins = [origin] |
538 | 538 | end |
539 | 539 |
|
540 | 540 | context "matches the default one" do |
|
610 | 610 | let(:client) { WebAuthn::FakeClient.new(origin, token_binding: token_binding, encoding: false) } |
611 | 611 |
|
612 | 612 | before do |
613 | | - WebAuthn.configuration.origin = origin |
| 613 | + WebAuthn.configuration.allowed_origins = [origin] |
614 | 614 | end |
615 | 615 |
|
616 | 616 | context "it has stuff" do |
|
718 | 718 |
|
719 | 719 | describe "user verification" do |
720 | 720 | before do |
721 | | - WebAuthn.configuration.origin = origin |
| 721 | + WebAuthn.configuration.allowed_origins = [origin] |
722 | 722 | end |
723 | 723 |
|
724 | 724 | context "when UV is not set" do |
|
738 | 738 |
|
739 | 739 | describe "attested credential data verification" do |
740 | 740 | before do |
741 | | - WebAuthn.configuration.origin = origin |
| 741 | + WebAuthn.configuration.allowed_origins = [origin] |
742 | 742 | end |
743 | 743 |
|
744 | 744 | context "when AT is not set" do |
|
783 | 783 | before do |
784 | 784 | attestation_response.attestation_statement.instance_variable_get(:@statement)["sig"] = |
785 | 785 | "corrupted signature".b |
786 | | - WebAuthn.configuration.origin = origin |
| 786 | + WebAuthn.configuration.allowed_origins = [origin] |
787 | 787 | end |
788 | 788 |
|
789 | 789 | context "when verification is set to true" do |
|
0 commit comments