Skip to content

Commit a8a46aa

Browse files
authored
Merge pull request #59153 from nextcloud/backport/59079/stable31
2 parents 25e44e1 + 82b5075 commit a8a46aa

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

apps/oauth2/lib/Controller/OauthApiController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function getToken(
9393
$response = new JSONResponse([
9494
'error' => 'invalid_request',
9595
], Http::STATUS_BAD_REQUEST);
96-
$response->throttle(['invalid_request' => 'token not found', 'code' => $code]);
96+
$response->throttle(['invalid_request' => 'token not found']);
9797
return $response;
9898
}
9999

apps/oauth2/tests/Controller/OauthApiControllerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function testGetTokenInvalidCode(): void {
9797
$expected = new JSONResponse([
9898
'error' => 'invalid_request',
9999
], Http::STATUS_BAD_REQUEST);
100-
$expected->throttle(['invalid_request' => 'token not found', 'code' => 'invalidcode']);
100+
$expected->throttle(['invalid_request' => 'token not found']);
101101

102102
$this->accessTokenMapper->method('getByCode')
103103
->with('invalidcode')
@@ -193,7 +193,7 @@ public function testRefreshTokenInvalidRefreshToken(): void {
193193
$expected = new JSONResponse([
194194
'error' => 'invalid_request',
195195
], Http::STATUS_BAD_REQUEST);
196-
$expected->throttle(['invalid_request' => 'token not found', 'code' => 'invalidrefresh']);
196+
$expected->throttle(['invalid_request' => 'token not found']);
197197

198198
$this->accessTokenMapper->method('getByCode')
199199
->with('invalidrefresh')

0 commit comments

Comments
 (0)