Changed 'oauth_token' to 'access_token'

This commit is contained in:
Alex Bilbie 2013-02-13 17:10:44 +00:00
parent d0b1034f35
commit 0f4546db47
2 changed files with 5 additions and 5 deletions

View File

@ -65,10 +65,10 @@ class ResourceServer
protected $request = null;
/**
* The query string key which is used by clients to present the access token (default: oauth_token)
* The query string key which is used by clients to present the access token (default: access_token)
* @var string
*/
protected $tokenKey = 'oauth_token';
protected $tokenKey = 'access_token';
/**
* Sets up the Resource

View File

@ -43,20 +43,20 @@ class Resource_Server_test extends PHPUnit_Framework_TestCase
public function test_getTokenKey()
{
$s = $this->returnDefault();
$this->assertEquals('oauth_token', $s->getTokenKey());
$this->assertEquals('access_token', $s->getTokenKey());
}
public function test_setTokenKey()
{
$s = $this->returnDefault();
$s->setTokenKey('access_token');
$s->setTokenKey('oauth_token');
$reflector = new ReflectionClass($s);
$requestProperty = $reflector->getProperty('tokenKey');
$requestProperty->setAccessible(true);
$v = $requestProperty->getValue($s);
$this->assertEquals('access_token', $v);
$this->assertEquals('oauth_token', $v);
}
/**