Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion solid/lib/Controller/ServerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ public function register() {
'origin' => $clientData['origin'],
);
$registration = $this->tokenGenerator->respondToRegistration($registration, $this->config->getPrivateKey());
return (new JSONResponse($registration));
return new JSONResponse($registration, Http::STATUS_CREATED);
// ->addHeader('Access-Control-Allow-Origin', $origin)
// ->addHeader('Access-Control-Allow-Methods', 'POST');
}
Expand Down
4 changes: 2 additions & 2 deletions solid/tests/Unit/Controller/ServerControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ public function testRegisterWithoutRedirectUris()
}

/**
* @testdox ServerController should return a 200 with client data when asked to register with valid redirect URIs
* @testdox ServerController should return a 201 with client data when asked to register with valid redirect URIs
*
* @covers ::register
*/
Expand All @@ -421,7 +421,7 @@ public function testRegisterWithRedirectUris()
'response_types' => ['id_token token'],
'token_endpoint_auth_method' => 'client_secret_basic',
];
$expected = $this->createExpectedResponse(Http::STATUS_OK, $data);
$expected = $this->createExpectedResponse(Http::STATUS_CREATED, $data);

$actualData = $response->getData();
$this->assertArrayHasKey('client_id', $actualData);
Expand Down