basic auth

This commit is contained in:
biglyderv 2024-11-26 11:38:28 -05:00
parent 0bd8a0cfc0
commit 73dafb8999
8 changed files with 274 additions and 0 deletions

11
scripts/init.php Normal file
View file

@ -0,0 +1,11 @@
<?php
require("../libs/test_secret.php");
global $db;
$sql = file_get_contents('../scripts/init.sql', true);
$db->exec($sql);
echo "Database was set up.";
?>

2
scripts/init.sql Normal file
View file

@ -0,0 +1,2 @@
CREATE TABLE IF NOT EXISTS main.auth (username TEXT, password TEXT);
CREATE TABLE IF NOT EXISTS main.token (username TEXT, token TEXT);