2012-12-29 01:42:16 +05:30
|
|
|
<?php
|
2013-02-14 01:29:08 +05:30
|
|
|
/**
|
|
|
|
* OAuth 2.0 Scope storage interface
|
|
|
|
*
|
2013-05-08 23:59:24 +05:30
|
|
|
* @package php-loep/oauth2-server
|
2013-02-14 01:29:08 +05:30
|
|
|
* @author Alex Bilbie <hello@alexbilbie.com>
|
2013-05-08 23:59:24 +05:30
|
|
|
* @copyright Copyright (c) 2013 PHP League of Extraordinary Packages
|
2013-02-14 01:29:08 +05:30
|
|
|
* @license http://mit-license.org/
|
2013-05-09 00:00:53 +05:30
|
|
|
* @link http://github.com/php-loep/oauth2-server
|
2013-02-14 01:29:08 +05:30
|
|
|
*/
|
2012-12-29 01:42:16 +05:30
|
|
|
|
2013-05-08 23:36:09 +05:30
|
|
|
namespace League\OAuth2\Storage;
|
2012-12-29 01:42:16 +05:30
|
|
|
|
|
|
|
interface ScopeInterface
|
|
|
|
{
|
2013-01-29 19:55:49 +05:30
|
|
|
/**
|
|
|
|
* Return information about a scope
|
|
|
|
*
|
|
|
|
* Example SQL query:
|
|
|
|
*
|
|
|
|
* <code>
|
2013-02-19 05:56:28 +05:30
|
|
|
* SELECT * FROM oauth_scopes WHERE scope = $scope
|
2013-01-29 19:55:49 +05:30
|
|
|
* </code>
|
|
|
|
*
|
|
|
|
* Response:
|
|
|
|
*
|
|
|
|
* <code>
|
|
|
|
* Array
|
|
|
|
* (
|
|
|
|
* [id] => (int) The scope's ID
|
|
|
|
* [scope] => (string) The scope itself
|
|
|
|
* [name] => (string) The scope's name
|
|
|
|
* [description] => (string) The scope's description
|
|
|
|
* )
|
|
|
|
* </code>
|
|
|
|
*
|
2013-03-28 16:14:45 +05:30
|
|
|
* @param string $scope The scope
|
|
|
|
* @param string $clientId The client ID
|
2013-01-29 19:55:49 +05:30
|
|
|
* @return bool|array If the scope doesn't exist return false
|
|
|
|
*/
|
2013-03-28 16:14:45 +05:30
|
|
|
public function getScope($scope, $clientId = null, $grantType = null);
|
2012-12-29 01:42:16 +05:30
|
|
|
}
|