Skip to content
This repository was archived by the owner on Jun 13, 2022. It is now read-only.

Commit f32106e

Browse files
Merge pull request #1 from DarkGhostHunter/master
Ready for production.
2 parents 84f7422 + 0f17d28 commit f32106e

File tree

6 files changed

+1
-10
lines changed

6 files changed

+1
-10
lines changed

database/migrations/2020_04_02_000000_create_web_authn_credentials_table.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ public function up()
2020
// Change accordingly for your users table if you need to.
2121
$table->unsignedBigInteger('user_id');
2222

23-
$table->boolean('is_enabled')->default(true);
24-
2523
$table->string('name')->nullable();
2624
$table->string('type', 16);
2725
$table->json('transports');
@@ -39,7 +37,7 @@ public function up()
3937
$table->timestamps();
4038
$table->softDeletes(WebAuthnCredential::DELETED_AT);
4139

42-
$table->primary(['id', 'is_enabled']);
40+
$table->primary(['id', 'user_id']);
4341
});
4442
}
4543

tests/Auth/EloquentWebAuthnProviderTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ public function test_retrieves_user_using_credential_id()
4949
DB::table('web_authn_credentials')->insert([
5050
'id' => 'test_credential_id',
5151
'user_id' => 1,
52-
'is_enabled' => true,
5352
'type' => 'public_key',
5453
'transports' => json_encode([]),
5554
'attestation_type' => 'none',

tests/Http/WebAuthnLoginTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ public function test_receives_webauthn_options_by_credentials()
100100
DB::table('web_authn_credentials')->insert([
101101
'id' => 'test_credential_id',
102102
'user_id' => 1,
103-
'is_enabled' => true,
104103
'type' => 'public_key',
105104
'transports' => json_encode([]),
106105
'attestation_type' => 'none',
@@ -146,7 +145,6 @@ public function test_disabled_credential_doesnt_show()
146145
DB::table('web_authn_credentials')->insert([
147146
'id' => 'test_credential_id',
148147
'user_id' => 1,
149-
'is_enabled' => false,
150148
'type' => 'public_key',
151149
'transports' => json_encode([]),
152150
'attestation_type' => 'none',
@@ -199,7 +197,6 @@ public function test_user_authenticates_with_webauthn()
199197
DB::table('web_authn_credentials')->insert([
200198
'id' => 'test_credential_id',
201199
'user_id' => 1,
202-
'is_enabled' => true,
203200
'type' => 'public_key',
204201
'transports' => json_encode([]),
205202
'attestation_type' => 'none',

tests/WebAuthn/WebAuthnAssertionTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ protected function setUp() : void
5959
DB::table('web_authn_credentials')->insert([
6060
'id' => 'test_credential_foo',
6161
'user_id' => 1,
62-
'is_enabled' => true,
6362
'type' => 'public_key',
6463
'transports' => json_encode([]),
6564
'attestation_type' => 'none',

tests/WebAuthn/WebAuthnAttestationTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ protected function setUp() : void
6161
DB::table('web_authn_credentials')->insert([
6262
'id' => 'test_credential_foo',
6363
'user_id' => 1,
64-
'is_enabled' => true,
6564
'type' => 'public_key',
6665
'transports' => json_encode([]),
6766
'attestation_type' => 'none',

tests/WebAuthnAuthenticationTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ protected function setUp() : void
4848
DB::table('web_authn_credentials')->insert([
4949
'id' => 'test_credential_foo',
5050
'user_id' => 1,
51-
'is_enabled' => true,
5251
'type' => 'public_key',
5352
'transports' => json_encode([]),
5453
'attestation_type' => 'none',

0 commit comments

Comments
 (0)