Merge branch 'release/2.0.2'

This commit is contained in:
Alex Bilbie 2013-05-08 19:39:28 -07:00
commit 196a5aea13
5 changed files with 11 additions and 8 deletions

View File

@ -43,11 +43,13 @@ Custom grants can be created easily by implementing an interface. Check out a gu
If you are using MySQL and want to very quickly implement the library then all of the storage interfaces have been implemented with PDO classes. Check out the guide here [https://github.com/php-loep/oauth2-server/wiki/Using-the-PDO-storage-classes](https://github.com/php-loep/oauth2-server/wiki/Using-the-PDO-storage-classes).
## Tutorials
## Tutorials and documentation
A tutorial on how to use the authorization server can be found at [http://alexbilbie.com/2013/02/developing-an-oauth2-authorization-server/](http://alexbilbie.com/2013/02/developing-an-oauth2-authorization-server/).
The wiki has lots of guides on how to use this library, check it out - [https://github.com/php-loep/oauth2-server/wiki](https://github.com/php-loep/oauth2-server/wiki).
A tutorial on how to use the resource server to secure an API server can be found at [http://alexbilbie.com/2013/02/securing-your-api-with-oauth-2/](http://alexbilbie.com/2013/02/securing-your-api-with-oauth-2/).
A tutorial on how to use the authorization server can be found on the wiki - (https://github.com/php-loep/oauth2-server/wiki/Developing-an-OAuth-2.0-authorization-server)[https://github.com/php-loep/oauth2-server/wiki/Developing-an-OAuth-2.0-authorization-server].
A tutorial on how to use the resource server to secure an API server can be found at [https://github.com/php-loep/oauth2-server/wiki/Securing-your-API-with-OAuth-2.0](https://github.com/php-loep/oauth2-server/wiki/Securing-your-API-with-OAuth-2.0).
## Future Goals

View File

@ -1,7 +1,7 @@
{
"name": "league/oauth2-server",
"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.",
"version": "2.0",
"version": "2.0.2",
"homepage": "https://github.com/php-leop/oauth2-server",
"license": "MIT",
"require": {
@ -35,7 +35,8 @@
}
],
"replace": {
"lncd/oauth2": "*"
"lncd/oauth2": "*",
"league/oauth2server": "*"
},
"autoload": {
"psr-0": {

View File

@ -127,7 +127,7 @@ class AuthCode implements GrantTypeInterface {
}
// Validate client ID and redirect URI
$clientDetails = $this->authServer->getStorage('client')->getClient($authParams['client_id'], null, $authParams['redirect_uri']);
$clientDetails = $this->authServer->getStorage('client')->getClient($authParams['client_id'], null, $authParams['redirect_uri'], $this->identifier);
if ($clientDetails === false) {
throw new Exception\ClientException($this->authServer->getExceptionMessage('invalid_client'), 8);

View File

@ -53,5 +53,5 @@ interface ClientInterface
* @param string $grantType The grant type used in the request
* @return bool|array Returns false if the validation fails, array on success
*/
public function getClient($clientId = null, $clientSecret = null, $redirectUri = null, $grantType = null);
public function getClient($clientId, $clientSecret = null, $redirectUri = null, $grantType);
}

View File

@ -6,7 +6,7 @@ use League\OAuth2\Server\Storage\ClientInterface;
class Client implements ClientInterface
{
public function getClient($clientId = null, $clientSecret = null, $redirectUri = null, $grantType = null)
public function getClient($clientId, $clientSecret = null, $redirectUri = null, $grantType)
{
$db = \ezcDbInstance::get();