mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-22 21:19:46 +05:30
Changed 'oauth_token' to 'access_token'
This commit is contained in:
parent
d0b1034f35
commit
0f4546db47
@ -65,10 +65,10 @@ class ResourceServer
|
|||||||
protected $request = null;
|
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
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $tokenKey = 'oauth_token';
|
protected $tokenKey = 'access_token';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the Resource
|
* Sets up the Resource
|
||||||
|
@ -43,20 +43,20 @@ class Resource_Server_test extends PHPUnit_Framework_TestCase
|
|||||||
public function test_getTokenKey()
|
public function test_getTokenKey()
|
||||||
{
|
{
|
||||||
$s = $this->returnDefault();
|
$s = $this->returnDefault();
|
||||||
$this->assertEquals('oauth_token', $s->getTokenKey());
|
$this->assertEquals('access_token', $s->getTokenKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_setTokenKey()
|
public function test_setTokenKey()
|
||||||
{
|
{
|
||||||
$s = $this->returnDefault();
|
$s = $this->returnDefault();
|
||||||
$s->setTokenKey('access_token');
|
$s->setTokenKey('oauth_token');
|
||||||
|
|
||||||
$reflector = new ReflectionClass($s);
|
$reflector = new ReflectionClass($s);
|
||||||
$requestProperty = $reflector->getProperty('tokenKey');
|
$requestProperty = $reflector->getProperty('tokenKey');
|
||||||
$requestProperty->setAccessible(true);
|
$requestProperty->setAccessible(true);
|
||||||
$v = $requestProperty->getValue($s);
|
$v = $requestProperty->getValue($s);
|
||||||
|
|
||||||
$this->assertEquals('access_token', $v);
|
$this->assertEquals('oauth_token', $v);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user