Skip to content

Commit

Permalink
Merge branch 'release/2.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbilbie committed May 9, 2013
2 parents 8b15405 + f2f99b4 commit 196a5ae
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down Expand Up @@ -35,7 +35,8 @@
}
],
"replace": {
"lncd/oauth2": "*"
"lncd/oauth2": "*",
"league/oauth2server": "*"
},
"autoload": {
"psr-0": {
Expand Down
2 changes: 1 addition & 1 deletion src/League/OAuth2/Server/Grant/AuthCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function checkAuthoriseParams($inputParams = array())
}

// 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);
Expand Down
2 changes: 1 addition & 1 deletion src/League/OAuth2/Server/Storage/ClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 1 addition & 1 deletion src/League/OAuth2/Server/Storage/PDO/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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();

Expand Down

0 comments on commit 196a5ae

Please sign in to comment.