aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-11-21 19:10:23 -0800
committerFriendika <info@friendika.com>2010-11-21 19:10:23 -0800
commit552c56102ea70c6c9e32e13675b564a36814a069 (patch)
tree6eb32c9a5b8d5d5746c41521f9efdcae9418a272
parent890b77a547c1a00ca1cd44db5777366e2e52e2ab (diff)
downloadvolse-hubzilla-552c56102ea70c6c9e32e13675b564a36814a069.tar.gz
volse-hubzilla-552c56102ea70c6c9e32e13675b564a36814a069.tar.bz2
volse-hubzilla-552c56102ea70c6c9e32e13675b564a36814a069.zip
oauth2 db
-rw-r--r--boot.php2
-rw-r--r--database.sql28
-rw-r--r--update.php28
3 files changed, 56 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index cdb1b35ed..f03a5be20 100644
--- a/boot.php
+++ b/boot.php
@@ -2,7 +2,7 @@
set_time_limit(0);
-define ( 'BUILD_ID', 1017 );
+define ( 'BUILD_ID', 1018 );
define ( 'DFRN_PROTOCOL_VERSION', '2.0' );
define ( 'EOL', "<br />\r\n" );
diff --git a/database.sql b/database.sql
index ffea60c49..a0b121b0a 100644
--- a/database.sql
+++ b/database.sql
@@ -381,4 +381,30 @@ CREATE TABLE IF NOT EXISTS `register` (
`uid` INT(11) UNSIGNED NOT NULL,
`password` CHAR(255) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE = MYISAM DEFAULT CHARSET=utf8; \ No newline at end of file
+) ENGINE = MYISAM DEFAULT CHARSET=utf8;
+
+
+CREATE TABLE IF NOT EXISTS `clients` (
+`client_id` VARCHAR( 20 ) NOT NULL ,
+`pw` VARCHAR( 20 ) NOT NULL ,
+`redirect_uri` VARCHAR( 200 ) NOT NULL ,
+PRIMARY KEY ( `client_id` )
+) ENGINE = MYISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `tokens` (
+`id` VARCHAR( 40 ) NOT NULL ,
+`client_id` VARCHAR( 20 ) NOT NULL ,
+`expires` INT NOT NULL ,
+`scope` VARCHAR( 200 ) NOT NULL ,
+PRIMARY KEY ( `id` )
+) ENGINE = MYISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `auth_codes` (
+`id` VARCHAR( 40 ) NOT NULL ,
+`client_id` VARCHAR( 20 ) NOT NULL ,
+`redirect_uri` VARCHAR( 200 ) NOT NULL ,
+`expires` INT NOT NULL ,
+`scope` VARCHAR( 250 ) NOT NULL ,
+PRIMARY KEY ( `id` )
+) ENGINE = MYISAM DEFAULT CHARSET=utf8;
+
diff --git a/update.php b/update.php
index 7ee27213d..c4995604e 100644
--- a/update.php
+++ b/update.php
@@ -139,3 +139,31 @@ function update_1016() {
q("ALTER TABLE `user` ADD `openid` CHAR( 255 ) NOT NULL AFTER `email` ");
}
+function update_1017() {
+
+ q(" CREATE TABLE IF NOT EXISTS `clients` (
+`client_id` VARCHAR( 20 ) NOT NULL ,
+`pw` VARCHAR( 20 ) NOT NULL ,
+`redirect_uri` VARCHAR( 200 ) NOT NULL ,
+PRIMARY KEY ( `client_id` )
+) ENGINE = MYISAM DEFAULT CHARSET=utf8 ");
+
+ q(" CREATE TABLE IF NOT EXISTS `tokens` (
+`id` VARCHAR( 40 ) NOT NULL ,
+`client_id` VARCHAR( 20 ) NOT NULL ,
+`expires` INT NOT NULL ,
+`scope` VARCHAR( 200 ) NOT NULL ,
+PRIMARY KEY ( `id` )
+) ENGINE = MYISAM DEFAULT CHARSET=utf8 ");
+
+ q("CREATE TABLE IF NOT EXISTS `auth_codes` (
+`id` VARCHAR( 40 ) NOT NULL ,
+`client_id` VARCHAR( 20 ) NOT NULL ,
+`redirect_uri` VARCHAR( 200 ) NOT NULL ,
+`expires` INT NOT NULL ,
+`scope` VARCHAR( 250 ) NOT NULL ,
+PRIMARY KEY ( `id` )
+) ENGINE = MYISAM DEFAULT CHARSET=utf8 ");
+
+}
+