-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
major refactoring of tests and code + remove some features + add bett…
…er features
- Loading branch information
1 parent
d9d7a5f
commit 593c4bb
Showing
20 changed files
with
696 additions
and
701 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
|
||
require 'vendor/autoload.php'; | ||
|
||
use IngeniozIT\Router\Route; | ||
use IngeniozIT\Router\RouteGroup; | ||
|
||
$routes = new RouteGroup( | ||
path: '/api/distributor/v1', | ||
middlewares: [ | ||
SetCorsHeadersMiddleware::class, | ||
DistributorErrorMiddleware::class, | ||
MaintenanceMiddleware::class, | ||
ApiCheckConfigurationEnabledMiddleware::class, | ||
], | ||
routes: [ | ||
new RouteGroup( | ||
path: '/oauth2', | ||
middlewares: [ | ||
CheckApiKeyAuthenticationModeMiddleware::class, | ||
DistributorScopesMiddleware::class, | ||
], | ||
routes: [ | ||
Route::post('/token', DistributorOAuth2Controller::class), | ||
Route::get( | ||
'/public-keys/latest', | ||
PublicKeyController::class, | ||
name: 'bar', | ||
where: ['foo' => 'bar'], | ||
with: ['foo' => 'bar'], | ||
), | ||
], | ||
name: 'foo', | ||
where: ['bar' => 'baz'], | ||
with: ['bar' => 'baz'], | ||
conditions: [ | ||
IsLoggedAsAdmin::class, | ||
], | ||
), | ||
], | ||
); | ||
|
||
|
||
class AdminIndexController | ||
{ | ||
|
||
} | ||
|
||
class AdminUserController | ||
{ | ||
|
||
} | ||
|
||
class IsLoggedAsAdmin | ||
{ | ||
|
||
} | ||
|
||
class AdminMiddleware | ||
{ | ||
|
||
} | ||
|
||
print_r($routes); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.