summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-06-17 09:35:01 -0400
committerEvan Prodromou <evan@prodromou.name>2008-06-17 09:35:01 -0400
commitc02a01914ab67c2bc25850034a75ee1046fd6870 (patch)
treec95b7ea20255b4791a8f292fd267de643647f1f1 /db
parentc4e50084369432242863161ccd95cca097fac80a (diff)
start openid rp integration
darcs-hash:20080617133501-84dde-adec156ac58b84cce41ae0e9bde58cf7637e6c42.gz
Diffstat (limited to 'db')
-rw-r--r--db/laconica.sql30
1 files changed, 29 insertions, 1 deletions
diff --git a/db/laconica.sql b/db/laconica.sql
index 97f56bd15..973d4f914 100644
--- a/db/laconica.sql
+++ b/db/laconica.sql
@@ -112,4 +112,32 @@ create table nonce (
constraint primary key (consumer_key, tok, nonce),
constraint foreign key (consumer_key, tok) references token (consumer_key, tok)
-); \ No newline at end of file
+);
+
+/* One-to-many relationship of user to openid_url */
+
+create table user_openid (
+ url varchar(255) primary key comment 'OpenID URL',
+ user_id integer not null unique key comment 'user owning this URL' references user (id),
+ created datetime not null comment 'date this record was created',
+ modified timestamp comment 'date this record was modified'
+);
+
+/* These are used by JanRain OpenID library */
+
+create table oid_associations (
+ server_url BLOB,
+ handle VARCHAR(255),
+ secret BLOB,
+ issued INTEGER,
+ lifetime INTEGER,
+ assoc_type VARCHAR(64),
+ PRIMARY KEY (server_url(255), handle)
+);
+
+create table oid_nonces (
+ server_url VARCHAR(2047),
+ timestamp INTEGER,
+ salt CHAR(40),
+ UNIQUE (server_url(255), timestamp, salt)
+);