feat: Add API key authentication (#1254)

Closes #945
This commit is contained in:
Samuel
2025-11-06 20:56:48 +01:00
committed by GitHub
parent 5a2564f575
commit b4cbd32bf2
75 changed files with 1501 additions and 94 deletions

View File

@@ -0,0 +1,23 @@
/*!
* Copyright (c) 2024 PLANKA Software GmbH
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
*/
exports.up = (knex) =>
knex.schema.alterTable('user_account', (table) => {
table.text('api_key_prefix');
table.text('api_key_hash');
table.timestamp('api_key_created_at', true);
/* Indexes */
table.unique('api_key_hash');
});
exports.down = (knex) =>
knex.schema.alterTable('user_account', (table) => {
table.dropColumn('api_key_prefix');
table.dropColumn('api_key_hash');
table.dropColumn('api_key_created_at');
});