Skip to content

Commit 3de2b22

Browse files
authored
Fix casing for grant_types and redirect_uris keys in OAuthRegisterController response (#117)
1 parent 01d44b8 commit 3de2b22

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Server/Http/Controllers/OAuthRegisterController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ public function __invoke(Request $request): JsonResponse
4646

4747
return response()->json([
4848
'client_id' => (string) $client->id,
49-
'grant_types' => $client->grantTypes,
49+
'grant_types' => $client->grant_types,
5050
'response_types' => ['code'],
51-
'redirect_uris' => $client->redirectUris,
51+
'redirect_uris' => $client->redirect_uris,
5252
'scope' => 'mcp:use',
5353
'token_endpoint_auth_method' => 'none',
5454
]);

tests/Unit/Server/RegistrarTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ class ClientRepository {
169169
public function createAuthorizationCodeGrantClient(string $name, array $redirectUris, bool $confidential = true, $user = null, bool $enableDeviceFlow = false) {
170170
return (object) [
171171
"id" => "test-client-id",
172-
"grantTypes" => ["authorization_code"],
173-
"redirectUris" => $redirectUris,
172+
"grant_types" => ["authorization_code"],
173+
"redirect_uris" => $redirectUris,
174174
];
175175
}
176176
}
@@ -207,8 +207,8 @@ class ClientRepository {
207207
public function createAuthorizationCodeGrantClient(string $name, array $redirectUris, bool $confidential = true, $user = null, bool $enableDeviceFlow = false) {
208208
return (object) [
209209
"id" => "test-client-id",
210-
"grantTypes" => ["authorization_code"],
211-
"redirectUris" => $redirectUris,
210+
"grant_types" => ["authorization_code"],
211+
"redirect_uris" => $redirectUris,
212212
];
213213
}
214214
}
@@ -247,8 +247,8 @@ class ClientRepository {
247247
public function createAuthorizationCodeGrantClient(string $name, array $redirectUris, bool $confidential = true, $user = null, bool $enableDeviceFlow = false) {
248248
return (object) [
249249
"id" => "test-client-id",
250-
"grantTypes" => ["authorization_code"],
251-
"redirectUris" => $redirectUris,
250+
"grant_types" => ["authorization_code"],
251+
"redirect_uris" => $redirectUris,
252252
];
253253
}
254254
}

0 commit comments

Comments
 (0)