feat: return a scim error on unknown paths
This commit is contained in:
parent
35177f6342
commit
42e4d5d71f
2 changed files with 24 additions and 0 deletions
|
@ -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'],
|
||||
]
|
||||
];
|
||||
|
|
22
lib/Controller/CatchAllController.php
Normal file
22
lib/Controller/CatchAllController.php
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue