Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cf9b859

Browse files
author
Andrew Sutherland
committed
Merge pull request #7 from oemebamo/master
english typo and missing user_id column for auth_codes in sql
2 parents 40853b0 + 6033798 commit cf9b859

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/OAuth2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ public function grantAccessToken(array $inputData = NULL, array $authHeaders = N
668668
}
669669

670670
if (empty($client[1])) {
671-
throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, 'The client_secret is mandatory for the "client_crendentials" grant type');
671+
throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, 'The client_secret is mandatory for the "client_credentials" grant type');
672672
}
673673
// NB: We don't need to check for $stored==false, because it was checked above already
674674
$stored = $this->storage->checkClientCredentialsGrant($client[0], $client[1]);

server/examples/pdo/mysql_create_tables.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
33
CREATE TABLE `auth_codes` (
44
`code` varchar(40) NOT NULL,
55
`client_id` varchar(20) NOT NULL,
6+
`user_id` int(11) UNSIGNED NOT NULL,
67
`redirect_uri` varchar(200) NOT NULL,
78
`expires` int(11) NOT NULL,
89
`scope` varchar(250) DEFAULT NULL,

0 commit comments

Comments
 (0)