1CREATE TABLE assoc ( 2 a_op text, 3 a_handle text NOT NULL, 4 a_type text DEFAULT 'HMAC-SHA1', 5 a_ctime text NOT NULL, 6 a_etime text NOT NULL, 7 a_secret text NOT NULL, 8 a_stateless integer NOT NULL DEFAULT 0, 9 a_itime integer, 10 UNIQUE(a_op,a_handle) 11); 12 13CREATE TABLE nonces ( 14 n_op text NOT NULL, 15 n_once text NOT NULL, 16 PRIMARY KEY (n_op,n_once) 17); 18 19CREATE TABLE ht_sessions ( 20 hts_id text NOT NULL PRIMARY KEY 21); 22 23CREATE TABLE auth_sessions ( 24 as_id integer PRIMARY KEY AUTOINCREMENT, 25 hts_id text NOT NULL REFERENCES ht_sessions(hts_id), 26 as_normalized_id text, 27 UNIQUE (hts_id,as_id) 28); 29 30CREATE TABLE endpoints_queue ( 31 as_id integer NOT NULL REFERENCES auth_sessions (as_id), 32 eq_ctime integer NOT NULL, 33 eq_ordinal integer NOT NULL, 34 eq_uri text, 35 eq_claimed_id text, 36 eq_local_id text 37); 38