From e5dc3001c4661b948d57f2bea80c3617c1722348 Mon Sep 17 00:00:00 2001 From: Matthew Hailwood Date: Wed, 4 Sep 2013 12:43:12 +1200 Subject: [PATCH] Update ClientInterface.php --- .../OAuth2/Server/Storage/ClientInterface.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/League/OAuth2/Server/Storage/ClientInterface.php b/src/League/OAuth2/Server/Storage/ClientInterface.php index 72538561..ac1a485c 100644 --- a/src/League/OAuth2/Server/Storage/ClientInterface.php +++ b/src/League/OAuth2/Server/Storage/ClientInterface.php @@ -20,19 +20,21 @@ interface ClientInterface * * * # Client ID + redirect URI - * SELECT oauth_clients.id, oauth_clients.secret, oauth_client_endpoints.redirect_uri, oauth_clients.name + * SELECT oauth_clients.id, oauth_clients.secret, oauth_client_endpoints.redirect_uri, oauth_clients.name, + * oauth_clients.auto_approve * FROM oauth_clients LEFT JOIN oauth_client_endpoints ON oauth_client_endpoints.client_id = oauth_clients.id * WHERE oauth_clients.id = :clientId AND oauth_client_endpoints.redirect_uri = :redirectUri * * # Client ID + client secret - * SELECT oauth_clients.id, oauth_clients.secret, oauth_clients.name FROM oauth_clients WHERE - * oauth_clients.id = :clientId AND oauth_clients.secret = :clientSecret + * SELECT oauth_clients.id, oauth_clients.secret, oauth_clients.name, oauth_clients.auto_approve FROM oauth_clients + * WHERE oauth_clients.id = :clientId AND oauth_clients.secret = :clientSecret * * # Client ID + client secret + redirect URI - * SELECT oauth_clients.id, oauth_clients.secret, oauth_client_endpoints.redirect_uri, oauth_clients.name FROM - * oauth_clients LEFT JOIN oauth_client_endpoints ON oauth_client_endpoints.client_id = oauth_clients.id - * WHERE oauth_clients.id = :clientId AND oauth_clients.secret = :clientSecret AND - * oauth_client_endpoints.redirect_uri = :redirectUri + * SELECT oauth_clients.id, oauth_clients.secret, oauth_client_endpoints.redirect_uri, oauth_clients.name, + * oauth_clients.auto_approve FROM oauth_clients LEFT JOIN oauth_client_endpoints + * ON oauth_client_endpoints.client_id = oauth_clients.id + * WHERE oauth_clients.id = :clientId AND oauth_clients.secret = :clientSecret AND + * oauth_client_endpoints.redirect_uri = :redirectUri * * * Response: @@ -44,6 +46,7 @@ interface ClientInterface * [client secret] => (string) The client secret * [redirect_uri] => (string) The redirect URI used in this request * [name] => (string) The name of the client + * [auto_approve] => (bool) Whether the client should auto approve * ) * * @@ -54,4 +57,4 @@ interface ClientInterface * @return bool|array Returns false if the validation fails, array on success */ public function getClient($clientId, $clientSecret = null, $redirectUri = null, $grantType = null); -} \ No newline at end of file +}