feat: return a scim error on unknown paths

This commit is contained in:
Hugo Renard 2024-10-28 15:11:41 +01:00
parent 35177f6342
commit 42e4d5d71f
Signed by: hougo
GPG key ID: 3A285FD470209C59
2 changed files with 24 additions and 0 deletions

View file

@ -17,5 +17,7 @@ return [
['name' => 'group#create', 'url' => '/Groups', 'verb' => 'POST'],
['name' => 'group#update', 'url' => '/Groups/{id}', 'verb' => 'PUT'],
['name' => 'group#destroy', 'url' => '/Groups/{id}', 'verb' => 'DELETE'],
['name' => 'catch_all#index', 'url' => '/{path}', 'verb' => 'GET'],
]
];

View file

@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace OCA\SCIMServiceProvider\Controller;
use Exception;
use OCA\SCIMServiceProvider\Responses\SCIMJSONResponse;
use OCA\SCIMServiceProvider\Responses\SCIMListResponse;
use OCP\AppFramework\ApiController;
class CatchAllController extends ApiController {
/**
* @NoCSRFRequired
* @PublicPage
*
* @return SCIMListResponse
*/
public function index(string $path): SCIMJSONResponse {
throw new Exception('Not found', 404);
}
}