mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-16 18:19:47 +05:30
Updated docblocks and example queries in scope and client storage interfaces
This commit is contained in:
parent
75894fd5bc
commit
ca9760cd36
@ -20,17 +20,19 @@ interface ClientInterface
|
|||||||
*
|
*
|
||||||
* <code>
|
* <code>
|
||||||
* # Client ID + redirect URI
|
* # Client ID + redirect URI
|
||||||
* SELECT oauth_clients.id FROM oauth_clients LEFT JOIN client_endpoints ON client_endpoints.client_id
|
* SELECT oauth_clients.id, oauth_clients.secret, oauth_client_endpoints.redirect_uri, oauth_clients.name
|
||||||
* = oauth_clients.id WHERE oauth_clients.id = $clientId AND client_endpoints.redirect_uri = $redirectUri
|
* 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
|
* # Client ID + client secret
|
||||||
* SELECT oauth_clients.id FROM oauth_clients WHERE oauth_clients.id = $clientId AND
|
* SELECT oauth_clients.id, oauth_clients.secret, oauth_clients.name FROM oauth_clients WHERE
|
||||||
* oauth_clients.secret = $clientSecret
|
* oauth_clients.id = :clientId AND oauth_clients.secret = :clientSecret
|
||||||
*
|
*
|
||||||
* # Client ID + client secret + redirect URI
|
* # Client ID + client secret + redirect URI
|
||||||
* SELECT oauth_clients.id FROM oauth_clients LEFT JOIN client_endpoints ON client_endpoints.client_id
|
* SELECT oauth_clients.id, oauth_clients.secret, oauth_client_endpoints.redirect_uri, oauth_clients.name FROM
|
||||||
* = oauth_clients.id WHERE oauth_clients.id = $clientId AND oauth_clients.secret = $clientSecret
|
* oauth_clients LEFT JOIN oauth_client_endpoints ON oauth_client_endpoints.client_id = oauth_clients.id
|
||||||
* AND client_endpoints.redirect_uri = $redirectUri
|
* WHERE oauth_clients.id = :clientId AND oauth_clients.secret = :clientSecret AND
|
||||||
|
* oauth_client_endpoints.redirect_uri = :redirectUri
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* Response:
|
* Response:
|
||||||
|
@ -19,7 +19,7 @@ interface ScopeInterface
|
|||||||
* Example SQL query:
|
* Example SQL query:
|
||||||
*
|
*
|
||||||
* <code>
|
* <code>
|
||||||
* SELECT * FROM oauth_scopes WHERE scope = $scope
|
* SELECT * FROM oauth_scopes WHERE oauth_scopes.key = :scope
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* Response:
|
* Response:
|
||||||
@ -28,7 +28,7 @@ interface ScopeInterface
|
|||||||
* Array
|
* Array
|
||||||
* (
|
* (
|
||||||
* [id] => (int) The scope's ID
|
* [id] => (int) The scope's ID
|
||||||
* [scope] => (string) The scope itself
|
* [key] => (string) The scope itself
|
||||||
* [name] => (string) The scope's name
|
* [name] => (string) The scope's name
|
||||||
* [description] => (string) The scope's description
|
* [description] => (string) The scope's description
|
||||||
* )
|
* )
|
||||||
@ -36,6 +36,7 @@ interface ScopeInterface
|
|||||||
*
|
*
|
||||||
* @param string $scope The scope
|
* @param string $scope The scope
|
||||||
* @param string $clientId The client ID
|
* @param string $clientId The client ID
|
||||||
|
* @param string $grantType The grant type used in the request
|
||||||
* @return bool|array If the scope doesn't exist return false
|
* @return bool|array If the scope doesn't exist return false
|
||||||
*/
|
*/
|
||||||
public function getScope($scope, $clientId = null, $grantType = null);
|
public function getScope($scope, $clientId = null, $grantType = null);
|
||||||
|
Loading…
Reference in New Issue
Block a user