mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-01-09 05:23:53 +05:30
Changed indent to spaces
This commit is contained in:
parent
e859f435a1
commit
519d20f0a5
@ -4,16 +4,16 @@ namespace Oauth2\Resource;
|
|||||||
|
|
||||||
interface Database
|
interface Database
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Validate an access token and return the session details.
|
* Validate an access token and return the session details.
|
||||||
*
|
*
|
||||||
* Database query:
|
* Database query:
|
||||||
*
|
*
|
||||||
* <code>
|
* <code>
|
||||||
* SELECT id, owner_type, owner_id FROM oauth_sessions WHERE access_token =
|
* SELECT id, owner_type, owner_id FROM oauth_sessions WHERE access_token =
|
||||||
* $accessToken AND stage = 'granted' AND
|
* $accessToken AND stage = 'granted' AND
|
||||||
* access_token_expires > UNIX_TIMESTAMP(now())
|
* access_token_expires > UNIX_TIMESTAMP(now())
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* Response:
|
* Response:
|
||||||
*
|
*
|
||||||
@ -25,35 +25,35 @@ interface Database
|
|||||||
* [owner_id] => (string) The session owner's ID
|
* [owner_id] => (string) The session owner's ID
|
||||||
* )
|
* )
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param string $accessToken The access token
|
* @param string $accessToken The access token
|
||||||
* @return array|bool Return an array on success or false on failure
|
* @return array|bool Return an array on success or false on failure
|
||||||
*/
|
*/
|
||||||
public function validateAccessToken($accessToken);
|
public function validateAccessToken($accessToken);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the scopes that the session is authorised with.
|
* Returns the scopes that the session is authorised with.
|
||||||
*
|
*
|
||||||
* Database query:
|
* Database query:
|
||||||
*
|
*
|
||||||
* <code>
|
* <code>
|
||||||
* SELECT scope FROM oauth_session_scopes WHERE access_token =
|
* SELECT scope FROM oauth_session_scopes WHERE access_token =
|
||||||
* '291dca1c74900f5f252de351e0105aa3fc91b90b'
|
* '291dca1c74900f5f252de351e0105aa3fc91b90b'
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* Response:
|
* Response:
|
||||||
*
|
*
|
||||||
* <code>
|
* <code>
|
||||||
* Array
|
* Array
|
||||||
* (
|
* (
|
||||||
* [0] => (string) A scope
|
* [0] => (string) A scope
|
||||||
* [1] => (string) Another scope
|
* [1] => (string) Another scope
|
||||||
* ...
|
* ...
|
||||||
* )
|
* )
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param int $sessionId The session ID
|
* @param int $sessionId The session ID
|
||||||
* @return array A list of scopes
|
* @return array A list of scopes
|
||||||
*/
|
*/
|
||||||
public function sessionScopes($sessionId);
|
public function sessionScopes($sessionId);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user