Revision 6754,
1.2 KB
checked in by niltonneto, 12 years ago
(diff) |
Ticket #0000 - Copiadas as alterações do Trunk. Versão final da 2.4.1.
|
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[6351] | 1 | <?php |
---|
| 2 | |
---|
| 3 | /** |
---|
| 4 | * Storage engines that support the "Client Credentials" |
---|
| 5 | * grant type should implement this interface |
---|
| 6 | * |
---|
| 7 | * @author Dave Rochwerger <catch.dave@gmail.com> |
---|
| 8 | * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.4 |
---|
| 9 | */ |
---|
| 10 | interface IOAuth2GrantClient extends IOAuth2Storage { |
---|
| 11 | |
---|
| 12 | /** |
---|
| 13 | * Required for OAuth2::GRANT_TYPE_CLIENT_CREDENTIALS. |
---|
| 14 | * |
---|
| 15 | * @param $client_id |
---|
| 16 | * Client identifier to be check with. |
---|
| 17 | * @param $client_secret |
---|
| 18 | * (optional) If a secret is required, check that they've given the right one. |
---|
| 19 | * |
---|
| 20 | * @return |
---|
| 21 | * TRUE if the client credentials are valid, and MUST return FALSE if it isn't. |
---|
| 22 | * When using "client credentials" grant mechanism and you want to |
---|
| 23 | * verify the scope of a user's access, return an associative array |
---|
| 24 | * with the scope values as below. We'll check the scope you provide |
---|
| 25 | * against the requested scope before providing an access token: |
---|
| 26 | * @code |
---|
| 27 | * return array( |
---|
| 28 | * 'scope' => <stored scope values (space-separated string)>, |
---|
| 29 | * ); |
---|
| 30 | * @endcode |
---|
| 31 | * |
---|
| 32 | * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.4.2 |
---|
| 33 | * |
---|
| 34 | * @ingroup oauth2_section_4 |
---|
| 35 | */ |
---|
| 36 | public function checkClientCredentialsGrant($client_id, $client_secret); |
---|
| 37 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.