Bugzilla – Attachment 194698 Details for
Bug 39601
Add passkey support to Koha as an authentication mechanism
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39601: [DO NOT PUSH] DBIC changes
Bug-39601-DO-NOT-PUSH-DBIC-changes.patch (text/plain), 5.25 KB, created by
Paul Derscheid
on 2026-03-06 12:23:46 UTC
(
hide
)
Description:
Bug 39601: [DO NOT PUSH] DBIC changes
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2026-03-06 12:23:46 UTC
Size:
5.25 KB
patch
obsolete
>From 2d7b05a4d9d9b411a264bd6ad88729e5d3b9b5b4 Mon Sep 17 00:00:00 2001 >From: Paul Derscheid <paul.derscheid@lmscloud.de> >Date: Fri, 6 Mar 2026 11:24:46 +0100 >Subject: [PATCH] Bug 39601: [DO NOT PUSH] DBIC changes > >--- > Koha/Schema/Result/Borrower.pm | 19 ++- > Koha/Schema/Result/WebauthnCredential.pm | 186 +++++++++++++++++++++++ > 2 files changed, 203 insertions(+), 2 deletions(-) > create mode 100644 Koha/Schema/Result/WebauthnCredential.pm > >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index 2c8bf77f78b..b3eaf3732fa 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -2161,6 +2161,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 webauthn_credentials >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::WebauthnCredential> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "webauthn_credentials", >+ "Koha::Schema::Result::WebauthnCredential", >+ { "foreign.borrowernumber" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 basketnoes > > Type: many_to_many >@@ -2212,8 +2227,8 @@ Composing rels: L</user_permissions> -> permission > __PACKAGE__->many_to_many("permissions", "user_permissions", "permission"); > > >-# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-10-29 16:44:27 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SSJcjPvlr82qecmbk1Q8iA >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2026-01-07 14:02:35 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:a7+tJLDpuCCrE3BVSdgN2g > > __PACKAGE__->belongs_to( > "library", >diff --git a/Koha/Schema/Result/WebauthnCredential.pm b/Koha/Schema/Result/WebauthnCredential.pm >new file mode 100644 >index 00000000000..d90b4682142 >--- /dev/null >+++ b/Koha/Schema/Result/WebauthnCredential.pm >@@ -0,0 +1,186 @@ >+use utf8; >+package Koha::Schema::Result::WebauthnCredential; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::WebauthnCredential >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<webauthn_credentials> >+ >+=cut >+ >+__PACKAGE__->table("webauthn_credentials"); >+ >+=head1 ACCESSORS >+ >+=head2 webauthn_credential_id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+primary key >+ >+=head2 borrowernumber >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+foreign key to borrowers.borrowernumber >+ >+=head2 credential_id >+ >+ data_type: 'varbinary' >+ is_nullable: 0 >+ size: 1024 >+ >+WebAuthn credential identifier >+ >+=head2 public_key >+ >+ data_type: 'varbinary' >+ is_nullable: 0 >+ size: 1024 >+ >+COSE public key for the credential >+ >+=head2 sign_count >+ >+ data_type: 'integer' >+ default_value: 0 >+ extra: {unsigned => 1} >+ is_nullable: 0 >+ >+signature counter for replay detection >+ >+=head2 transports >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 255 >+ >+comma-separated list of authenticator transports >+ >+=head2 nickname >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 255 >+ >+user-assigned name for the credential >+ >+=head2 created_date >+ >+ data_type: 'timestamp' >+ datetime_undef_if_invalid: 1 >+ default_value: current_timestamp >+ is_nullable: 0 >+ >+date and time the credential was registered >+ >+=head2 last_used_date >+ >+ data_type: 'datetime' >+ datetime_undef_if_invalid: 1 >+ is_nullable: 1 >+ >+date and time the credential was last used to authenticate >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "webauthn_credential_id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "borrowernumber", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+ "credential_id", >+ { data_type => "varbinary", is_nullable => 0, size => 1024 }, >+ "public_key", >+ { data_type => "varbinary", is_nullable => 0, size => 1024 }, >+ "sign_count", >+ { >+ data_type => "integer", >+ default_value => 0, >+ extra => { unsigned => 1 }, >+ is_nullable => 0, >+ }, >+ "transports", >+ { data_type => "varchar", is_nullable => 1, size => 255 }, >+ "nickname", >+ { data_type => "varchar", is_nullable => 1, size => 255 }, >+ "created_date", >+ { >+ data_type => "timestamp", >+ datetime_undef_if_invalid => 1, >+ default_value => \"current_timestamp", >+ is_nullable => 0, >+ }, >+ "last_used_date", >+ { >+ data_type => "datetime", >+ datetime_undef_if_invalid => 1, >+ is_nullable => 1, >+ }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</webauthn_credential_id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("webauthn_credential_id"); >+ >+=head1 UNIQUE CONSTRAINTS >+ >+=head2 C<credential_id> >+ >+=over 4 >+ >+=item * L</credential_id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->add_unique_constraint("credential_id", ["credential_id"]); >+ >+=head1 RELATIONS >+ >+=head2 borrowernumber >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Borrower> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "borrowernumber", >+ "Koha::Schema::Result::Borrower", >+ { borrowernumber => "borrowernumber" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2026-03-06 10:23:30 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:izt03pOZk7Hp9yDp9VoSjQ >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39601
:
185295
|
185296
|
185297
|
190988
|
190989
|
194696
|
194697
| 194698