Skip to content

Commit dfef78a

Browse files
piotr-grzelkabshaffer
authored andcommitted
RFC6750 compatibility (bshaffer#784)
1 parent 94caf2e commit dfef78a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/OAuth2/Controller/ResourceController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function getAccessTokenData(RequestInterface $request, ResponseInterface
8383
} elseif (!isset($token["expires"]) || !isset($token["client_id"])) {
8484
$response->setError(401, 'malformed_token', 'Malformed token (missing "expires")');
8585
} elseif (time() > $token["expires"]) {
86-
$response->setError(401, 'expired_token', 'The access token provided has expired');
86+
$response->setError(401, 'invalid_token', 'The access token provided has expired');
8787
} else {
8888
return $token;
8989
}

test/OAuth2/Controller/ResourceControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function testExpiredToken()
100100
$this->assertFalse($allow);
101101

102102
$this->assertEquals($response->getStatusCode(), 401);
103-
$this->assertEquals($response->getParameter('error'), 'expired_token');
103+
$this->assertEquals($response->getParameter('error'), 'invalid_token');
104104
$this->assertEquals($response->getParameter('error_description'), 'The access token provided has expired');
105105
}
106106

0 commit comments

Comments
 (0)