mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-16 02:08:56 +05:30
Added parameter doc blocks
This commit is contained in:
parent
d5f0ac479b
commit
78551b0859
@ -4,12 +4,30 @@ namespace oauth2server;
|
||||
|
||||
interface DatabaseInteface
|
||||
{
|
||||
/**
|
||||
* [validateClient description]
|
||||
* @param string $clientId The client's ID
|
||||
* @param string $clientSecret The client's secret (default = "null")
|
||||
* @param string $redirectUri The client's redirect URI (default = "null")
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function validateClient(
|
||||
$clientId,
|
||||
$clientSecret = null,
|
||||
$redirectUri = null
|
||||
);
|
||||
|
||||
/**
|
||||
* [newSession description]
|
||||
* @param string $clientId The client ID
|
||||
* @param string $redirectUri The redirect URI
|
||||
* @param string $type The session owner's type (default = "user")
|
||||
* @param string $typeId The session owner's ID (default = "null")
|
||||
* @param string $authCode The authorisation code (default = "null")
|
||||
* @param string $accessToken The access token (default = "null")
|
||||
* @param string $stage The stage of the session (default ="request")
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function newSession(
|
||||
$clientId,
|
||||
$redirectUri,
|
||||
@ -20,6 +38,16 @@ interface DatabaseInteface
|
||||
$stage = 'request'
|
||||
);
|
||||
|
||||
/**
|
||||
* [updateSession description]
|
||||
* @param string $clientId The client ID
|
||||
* @param string $type The session owner's type (default = "user")
|
||||
* @param string $typeId The session owner's ID (default = "null")
|
||||
* @param string $authCode The authorisation code (default = "null")
|
||||
* @param string $accessToken The access token (default = "null")
|
||||
* @param string $stage The stage of the session (default ="request")
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function updateSession(
|
||||
$clientId,
|
||||
$type = 'user',
|
||||
@ -29,12 +57,26 @@ interface DatabaseInteface
|
||||
$stage
|
||||
);
|
||||
|
||||
/**
|
||||
* [deleteSession description]
|
||||
* @param string $clientId The client ID
|
||||
* @param string $type The session owner's type
|
||||
* @param string $typeId The session owner's ID
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function deleteSession(
|
||||
$clientId,
|
||||
$type,
|
||||
$typeId
|
||||
);
|
||||
|
||||
/**
|
||||
* [validateAuthCode description]
|
||||
* @param string $clientId The client ID
|
||||
* @param string $redirectUri The redirect URI
|
||||
* @param string $authCode The authorisation code
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function validateAuthCode(
|
||||
$clientId,
|
||||
$redirectUri,
|
||||
@ -42,39 +84,74 @@ interface DatabaseInteface
|
||||
);
|
||||
|
||||
/**
|
||||
* Has access token
|
||||
*
|
||||
* Check if an access token exists for a user (or an application)
|
||||
*
|
||||
* @access public
|
||||
* @return bool|Return FALSE is a token doesn't exist or return the
|
||||
* access token as a string
|
||||
* [hasAccessToken description]
|
||||
* @param string $type The session owner's type
|
||||
* @param string $typeId The session owner's ID
|
||||
* @param string $clientId The client ID
|
||||
* @return boolean [description]
|
||||
*/
|
||||
public function hasAccessToken(
|
||||
$type,
|
||||
$typeId,
|
||||
$clientId
|
||||
);
|
||||
|
||||
/**
|
||||
* [getAccessToken description]
|
||||
* @param int $sessionId The OAuth session ID
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function getAccessToken($sessionId);
|
||||
|
||||
/**
|
||||
* [removeAuthCode description]
|
||||
* @param int $sessionId The OAuth session ID
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function removeAuthCode($sessionId);
|
||||
|
||||
/**
|
||||
* [setAccessToken description]
|
||||
* @param int $sessionId The OAuth session ID
|
||||
* @param string $accessToken The access token
|
||||
*/
|
||||
public function setAccessToken(
|
||||
$sessionId,
|
||||
int $sessionId,
|
||||
$accessToken
|
||||
);
|
||||
|
||||
/**
|
||||
* [addSessionScope description]
|
||||
* @param int $sessionId [description]
|
||||
* @param string $scope [description]
|
||||
*/
|
||||
public function addSessionScope(
|
||||
$sessionId,
|
||||
$scope
|
||||
);
|
||||
|
||||
/**
|
||||
* [getScope description]
|
||||
* @param string $scope [description]
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function getScope($scope);
|
||||
|
||||
/**
|
||||
* [updateSessionScopeAccessToken description]
|
||||
* @param int $sesstionId [description]
|
||||
* @param string $accessToken [description]
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function updateSessionScopeAccessToken(
|
||||
$sesstionId,
|
||||
$accessToken
|
||||
);
|
||||
|
||||
/**
|
||||
* [accessTokenScopes description]
|
||||
* @param string $accessToken [description]
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function accessTokenScopes($accessToken);
|
||||
}
|
Loading…
Reference in New Issue
Block a user