Compare commits

...

2 Commits
1.0.9 ... 1.0.8

Author SHA1 Message Date
Alex Bilbie
a2f87f20b7 Version bump 2013-03-18 16:48:38 +00:00
Alex Bilbie
b6ba08813d Small bug fixes. Fixes #13 2013-03-18 16:46:07 +00:00
4 changed files with 9 additions and 4 deletions

View File

@@ -1,5 +1,10 @@
# Changelog
## 1.0.8 (released 2013-03-18)
* Fixed check for required state parameter
* Fixed check that user's credentials are correct in Password grant
## 1.0.7 (released 2013-03-04)
* Added method `requireStateParam()`

View File

@@ -1,7 +1,7 @@
{
"name": "lncd/oauth2",
"description": "A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants",
"version": "1.0.7",
"version": "1.0.8",
"homepage": "https://github.com/lncd/OAuth2",
"license": "MIT",
"require": {

View File

@@ -291,8 +291,8 @@ class AuthServer
throw new Exception\ClientException(sprintf(self::$exceptionMessages['invalid_request'], 'redirect_uri'), 0);
}
if ($this->requireStateParam === true && is_null($authParams['redirect_uri'])) {
throw new Exception\ClientException(sprintf(self::$exceptionMessages['invalid_request'], 'redirect_uri'), 0);
if ($this->requireStateParam === true && is_null($authParams['state'])) {
throw new Exception\ClientException(sprintf(self::$exceptionMessages['invalid_request'], 'state'), 0);
}
// Validate client ID and redirect URI

View File

@@ -120,7 +120,7 @@ class Password implements GrantTypeInterface {
// Check if user's username and password are correct
$userId = call_user_func($this->getVerifyCredentialsCallback(), $authParams['username'], $authParams['password']);
if ($userId === false) {
if ($userId === false || $userId === null) {
throw new Exception\ClientException(AuthServer::getExceptionMessage('invalid_credentials'), 0);
}