From c02a01914ab67c2bc25850034a75ee1046fd6870 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 17 Jun 2008 09:35:01 -0400 Subject: start openid rp integration darcs-hash:20080617133501-84dde-adec156ac58b84cce41ae0e9bde58cf7637e6c42.gz --- db/laconica.sql | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'db') 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) +); -- cgit v1.2.3-54-g00ecf