PHP Classes

File: SQL File

Recommend this page to a friend!
  Packages of Matthew Asham   Binkterm PHP   database/migrations/v1.11.0.84_totp_used_codes.sql   Download  
File: database/migrations/v1.11.0.84_totp_used_codes.sql
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Binkterm PHP
Bulletin board system based on the Web
Author: By
Last change:
Date: 5 days ago
Size: 518 bytes
 

Contents

Class file image Download
-- Stores TOTP time-step counters that have already been accepted, preventing -- replay of a code within its valid window. Rows older than a few minutes are -- purged by PacketBbsTotp::verifyCode() on each successful authentication. CREATE TABLE IF NOT EXISTS totp_used_codes ( user_id INTEGER NOT NULL, step BIGINT NOT NULL, used_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), PRIMARY KEY (user_id, step) ); CREATE INDEX IF NOT EXISTS idx_totp_used_codes_used_at ON totp_used_codes (used_at);