Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:thephpleague/oauth2-server
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Sturgeon committed Jul 15, 2014
2 parents 4362f17 + 7771bc0 commit 08b1640
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/League/OAuth2/Server/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public static function getExceptionHttpHeaders($error)
// include the "WWW-Authenticate" response header field
// matching the authentication scheme used by the client.
// @codeCoverageIgnoreStart
if ($error === 'insufficient_scope') {
if ($error === 'invalid_token') {
$authScheme = null;
$request = new Request();
if ($request->server('PHP_AUTH_USER') !== null) {
Expand Down
4 changes: 2 additions & 2 deletions tests/resource/ResourceServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public function test_getExceptionCode()
public function test_getExceptionHttpHeaders()
{
$this->assertEquals(array('HTTP/1.1 400 Bad Request'), League\OAuth2\Server\Resource::getExceptionHttpHeaders('invalid_request'));
$this->assertEquals(array('HTTP/1.1 401 Unauthorized'), League\OAuth2\Server\Resource::getExceptionHttpHeaders('invalid_token'));
$this->assertContains('HTTP/1.1 403 Forbidden', League\OAuth2\Server\Resource::getExceptionHttpHeaders('insufficient_scope'));
$this->assertContains('HTTP/1.1 401 Unauthorized', League\OAuth2\Server\Resource::getExceptionHttpHeaders('invalid_token'));
$this->assertEquals(array('HTTP/1.1 403 Forbidden'), League\OAuth2\Server\Resource::getExceptionHttpHeaders('insufficient_scope'));
}

public function test_setRequest()
Expand Down

0 comments on commit 08b1640

Please sign in to comment.