Move OCS Middleware before security middleware
This is required to be able to catch the NotLoggedIn exceptions etc in the OCSMiddleware and convert them to proper OCS Responses.
This commit is contained in:
parent
241fc286c7
commit
deba0f9922
1 changed files with 1 additions and 1 deletions
|
@ -396,6 +396,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
|
|||
$this->registerService('MiddlewareDispatcher', function($c) use (&$middleWares) {
|
||||
$dispatcher = new MiddlewareDispatcher();
|
||||
$dispatcher->registerMiddleware($c['CORSMiddleware']);
|
||||
$dispatcher->registerMiddleware($c['OCSMiddleware']);
|
||||
$dispatcher->registerMiddleware($c['SecurityMiddleware']);
|
||||
$dispatcher->registerMiddleWare($c['TwoFactorMiddleware']);
|
||||
|
||||
|
@ -404,7 +405,6 @@ class DIContainer extends SimpleContainer implements IAppContainer {
|
|||
}
|
||||
|
||||
$dispatcher->registerMiddleware($c['SessionMiddleware']);
|
||||
$dispatcher->registerMiddleware($c['OCSMiddleware']);
|
||||
return $dispatcher;
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue