diff --git a/src/OAuth2/ResourceServer.php b/src/OAuth2/ResourceServer.php index 96a5bd4d..e7cc7d2f 100644 --- a/src/OAuth2/ResourceServer.php +++ b/src/OAuth2/ResourceServer.php @@ -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 diff --git a/tests/resource/ResourceServerTest.php b/tests/resource/ResourceServerTest.php index b8fed73e..c6bc058d 100644 --- a/tests/resource/ResourceServerTest.php +++ b/tests/resource/ResourceServerTest.php @@ -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); } /**