Added a test class to make debugging easier

This commit is contained in:
Alex Bilbie 2012-07-13 09:41:21 +01:00
parent ad26632a71
commit 4eacf97dff

84
test/index.php Normal file
View File

@ -0,0 +1,84 @@
<?php
include_once('../src/oauth2server/Dbinterface.php');
include_once('../src/oauth2server/Server.php');
use \oauth2server;
class db extends oauth2server\ServerDB {
public function validateClient(
string $clientId,
string $clientSecret = null,
string $redirectUri = null
){}
public function newSession(
string $clientId,
string $redirectUri,
$type = 'user',
string $typeId = null,
string $authCode = null,
string $accessToken = null,
$stage = 'request'
){}
public function updateSession(
string $clientId,
$type = 'user',
string $typeId = null,
string $authCode = null,
string $accessToken = null,
string $stage
){}
public function deleteSession(
string $clientId,
string $type,
string $typeId
){}
public function validateAuthCode(
string $clientId,
string $redirectUri,
string $authCode
){}
/**
* Has access token
*
* Check if an access token exists for a user (or an application)
*
* @access public
* @return bool|string Return FALSE is a token doesn't exist or return the
* access token as a string
*/
public function hasAccessToken(
string $typeId,
string $clientId
){}
public function getAccessToken(int $sessionId){}
public function removeAuthCode(int $sessionId){}
public function setAccessToken(
int $sessionId,
string $accessToken
){}
public function addSessionScope(
int $sessionId,
string $scope
){}
public function getScope(string $scope){}
public function updateSessionScopeAccessToken(
int $sesstionId,
string $accessToken
){}
public function accessTokenScopes(string $accessToken){}
}
$server = new oauth2server\Server();