Evidencija prijava — login_istorija tabela, logovanje svih pokušaja, stranica istorije po korisniku, WebAuthn shema
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
CREATE TABLE IF NOT EXISTS login_istorija (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
korisnik_id INTEGER,
|
||||
ip TEXT NOT NULL DEFAULT '',
|
||||
user_agent TEXT NOT NULL DEFAULT '',
|
||||
uspeh INTEGER NOT NULL DEFAULT 0,
|
||||
razlog TEXT NOT NULL DEFAULT '',
|
||||
vreme DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (korisnik_id) REFERENCES korisnici(id) ON DELETE SET NULL
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_login_istorija_korisnik ON login_istorija(korisnik_id, vreme);
|
||||
@@ -0,0 +1,9 @@
|
||||
CREATE TABLE IF NOT EXISTS webauthn_kredencijali (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
korisnik_id INTEGER NOT NULL,
|
||||
credential_id TEXT NOT NULL UNIQUE,
|
||||
public_key BLOB NOT NULL,
|
||||
sign_count INTEGER NOT NULL DEFAULT 0,
|
||||
datum_kreiranja DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (korisnik_id) REFERENCES korisnici(id) ON DELETE CASCADE
|
||||
);
|
||||
Reference in New Issue
Block a user