Skip to content

Commit b16c58b

Browse files
committed
mErge branch 'release/2.0.5'
2 parents 1375f91 + e6d0a19 commit b16c58b

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 2.0.5 (released 2013-05-09)
4+
5+
* Fixed `oauth_session_token_scopes` table primary key
6+
* Removed `DEFAULT ''` that has slipped into some tables
7+
* Fixed docblock for `SessionInterface::associateRefreshToken()`
8+
39
## 2.0.4 (released 2013-05-09)
410

511
* Renamed primary key in oauth_client_endpoints table

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "league/oauth2-server",
33
"description": "A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.",
4-
"version": "2.0.4",
4+
"version": "2.0.5",
55
"homepage": "https://github.com/php-loep/oauth2-server",
66
"license": "MIT",
77
"require": {

sql/mysql.sql

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ CREATE TABLE `oauth_sessions` (
2929
CREATE TABLE `oauth_session_access_tokens` (
3030
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
3131
`session_id` int(10) unsigned NOT NULL,
32-
`access_token` char(40) NOT NULL DEFAULT '',
32+
`access_token` char(40) NOT NULL,
3333
`access_token_expires` int(10) unsigned NOT NULL,
3434
PRIMARY KEY (`id`),
3535
UNIQUE KEY `u_oaseacto_acto_seid` (`access_token`,`session_id`),
@@ -39,7 +39,7 @@ CREATE TABLE `oauth_session_access_tokens` (
3939

4040
CREATE TABLE `oauth_session_authcodes` (
4141
`session_id` int(10) unsigned NOT NULL,
42-
`auth_code` char(40) NOT NULL DEFAULT '',
42+
`auth_code` char(40) NOT NULL,
4343
`auth_code_expires` int(10) unsigned NOT NULL,
4444
`scope_ids` char(255) DEFAULT NULL,
4545
PRIMARY KEY (`session_id`),
@@ -48,16 +48,16 @@ CREATE TABLE `oauth_session_authcodes` (
4848

4949
CREATE TABLE `oauth_session_redirects` (
5050
`session_id` int(10) unsigned NOT NULL,
51-
`redirect_uri` varchar(255) NOT NULL DEFAULT '',
51+
`redirect_uri` varchar(255) NOT NULL,
5252
PRIMARY KEY (`session_id`),
5353
CONSTRAINT `f_oasere_seid` FOREIGN KEY (`session_id`) REFERENCES `oauth_sessions` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
5454
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
5555

5656
CREATE TABLE `oauth_session_refresh_tokens` (
5757
`session_access_token_id` int(10) unsigned NOT NULL,
58-
`refresh_token` char(40) NOT NULL DEFAULT '',
58+
`refresh_token` char(40) NOT NULL,
5959
`refresh_token_expires` int(10) unsigned NOT NULL,
60-
`client_id` char(40) NOT NULL DEFAULT '',
60+
`client_id` char(40) NOT NULL,
6161
PRIMARY KEY (`session_access_token_id`),
6262
KEY `client_id` (`client_id`),
6363
CONSTRAINT `oauth_session_refresh_tokens_ibfk_1` FOREIGN KEY (`client_id`) REFERENCES `oauth_clients` (`id`) ON DELETE CASCADE,
@@ -74,10 +74,10 @@ CREATE TABLE `oauth_scopes` (
7474
) ENGINE=INNODB DEFAULT CHARSET=utf8;
7575

7676
CREATE TABLE `oauth_session_token_scopes` (
77-
`session_token_scope_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
77+
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
7878
`session_access_token_id` int(10) unsigned DEFAULT NULL,
7979
`scope_id` smallint(5) unsigned NOT NULL,
80-
PRIMARY KEY (`session_token_scope_id`),
80+
PRIMARY KEY (`id`),
8181
UNIQUE KEY `u_setosc_setoid_scid` (`session_access_token_id`,`scope_id`),
8282
KEY `f_oasetosc_scid` (`scope_id`),
8383
CONSTRAINT `f_oasetosc_scid` FOREIGN KEY (`scope_id`) REFERENCES `oauth_scopes` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,

src/League/OAuth2/Server/Storage/SessionInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ public function associateAccessToken($sessionId, $accessToken, $expireTime);
8484
* Example SQL query:
8585
*
8686
* <code>
87-
* oauth_session_refresh_tokens (session_access_token_id, refresh_token, refresh_token_expires)
88-
* VALUE (:accessTokenId, :refreshToken, :expireTime)
87+
* INSERT INTO oauth_session_refresh_tokens (session_access_token_id, refresh_token, refresh_token_expires,
88+
* client_id) VALUE (:accessTokenId, :refreshToken, :expireTime, :clientId)
8989
* </code>
9090
*
9191
* @param int $accessTokenId The access token ID

0 commit comments

Comments
 (0)