From d842d395d0e6c9385e4d7ab9edf0a5ef740ff0b9 Mon Sep 17 00:00:00 2001 From: Julien Chaumond Date: Tue, 19 Feb 2013 21:25:46 +0100 Subject: [PATCH 1/3] Fix composer element --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d65bcaf3..5c2a5fd6 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The framework is provided as a Composer package which can be installed by adding ```javascript { "require": { - "lncd\OAuth2": "*" + "lncd/OAuth2": "*" } } ``` From c25be195f93142eb1a01184bac2862e9712e2336 Mon Sep 17 00:00:00 2001 From: Julien Chaumond Date: Tue, 19 Feb 2013 21:24:19 +0100 Subject: [PATCH 2/3] Re-order MySQL table creations Or it fails, at least on my version of MySQL (5.5.29), through PhpMyAdmin --- sql/mysql.sql | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/sql/mysql.sql b/sql/mysql.sql index 9d30a76d..a6e96d0c 100644 --- a/sql/mysql.sql +++ b/sql/mysql.sql @@ -1,12 +1,3 @@ -CREATE TABLE `oauth_client_endpoints` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `client_id` varchar(40) NOT NULL DEFAULT '', - `redirect_uri` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `client_id` (`client_id`), - CONSTRAINT `oauth_client_endpoints_ibfk_1` FOREIGN KEY (`client_id`) REFERENCES `oauth_clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - CREATE TABLE `oauth_clients` ( `id` varchar(40) NOT NULL DEFAULT '', `secret` varchar(40) NOT NULL DEFAULT '', @@ -15,15 +6,13 @@ CREATE TABLE `oauth_clients` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE `oauth_session_scopes` ( +CREATE TABLE `oauth_client_endpoints` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `session_id` int(11) unsigned NOT NULL, - `scope_id` int(11) unsigned NOT NULL, + `client_id` varchar(40) NOT NULL DEFAULT '', + `redirect_uri` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), - KEY `session_id` (`session_id`), - KEY `scope_id` (`scope_id`), - CONSTRAINT `oauth_session_scopes_ibfk_5` FOREIGN KEY (`scope_id`) REFERENCES `oauth_scopes` (`id`) ON DELETE CASCADE, - CONSTRAINT `oauth_session_scopes_ibfk_4` FOREIGN KEY (`session_id`) REFERENCES `oauth_sessions` (`id`) ON DELETE CASCADE + KEY `client_id` (`client_id`), + CONSTRAINT `oauth_client_endpoints_ibfk_1` FOREIGN KEY (`client_id`) REFERENCES `oauth_clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `oauth_sessions` ( @@ -50,4 +39,15 @@ CREATE TABLE `oauth_scopes` ( `description` varchar(255) DEFAULT '', PRIMARY KEY (`id`), UNIQUE KEY `scope` (`scope`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE `oauth_session_scopes` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `session_id` int(11) unsigned NOT NULL, + `scope_id` int(11) unsigned NOT NULL, + PRIMARY KEY (`id`), + KEY `session_id` (`session_id`), + KEY `scope_id` (`scope_id`), + CONSTRAINT `oauth_session_scopes_ibfk_5` FOREIGN KEY (`scope_id`) REFERENCES `oauth_scopes` (`id`) ON DELETE CASCADE, + CONSTRAINT `oauth_session_scopes_ibfk_4` FOREIGN KEY (`session_id`) REFERENCES `oauth_sessions` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file From 17e72e0cf40fd8a9db6e8a7d522d8d4387ed7a89 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Wed, 20 Feb 2013 12:33:47 +0000 Subject: [PATCH 3/3] Fixed composer.json version + bump --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 8d62bbe8..b0670c7d 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,7 @@ { "name": "lncd/oauth2", "description": "OAuth 2.0 Framework", - "version": "1.0.0", - "version": "1.0.1", + "version": "1.0.2", "homepage": "https://github.com/lncd/OAuth2", "license": "MIT", "require": {