summaryrefslogtreecommitdiff
path: root/db/laconica.sql
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-03-07 12:55:09 -0800
committerEvan Prodromou <evan@controlyourself.ca>2009-03-07 12:55:09 -0800
commit1179ecd13d68e76d74ad94e2d3ca22d9681eeffe (patch)
treee0517dbd0df004f531adfa6f411c2087b5bd0190 /db/laconica.sql
parent22742c3b72a02c29eef0e678abd839e378a783c4 (diff)
Fix nonce usage in OAuth store
The OAuth store was failing on getting a request token, because the token value was forced to be non-null in the DB. Let this value be null, and use the correct primary key (consumer, timestamp, nonce). Drop the reference to token table, and don't ever use it.
Diffstat (limited to 'db/laconica.sql')
-rw-r--r--db/laconica.sql5
1 files changed, 2 insertions, 3 deletions
diff --git a/db/laconica.sql b/db/laconica.sql
index c2cd887de..098fa4fd1 100644
--- a/db/laconica.sql
+++ b/db/laconica.sql
@@ -181,15 +181,14 @@ create table token (
create table nonce (
consumer_key varchar(255) not null comment 'unique identifier, root URL',
- tok char(32) not null comment 'identifying value',
+ tok char(32) null comment 'buggy old value, ignored',
nonce char(32) not null comment 'nonce',
ts datetime not null comment 'timestamp sent',
created datetime not null comment 'date this record was created',
modified timestamp comment 'date this record was modified',
- constraint primary key (consumer_key, tok, nonce),
- constraint foreign key (consumer_key, tok) references token (consumer_key, tok)
+ constraint primary key (consumer_key, ts, nonce)
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
/* One-to-many relationship of user to openid_url */