mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-15 01:36:02 +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;
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user