Permalink
Browse files

NoActiveWorkspace => disconnect before throwing an AuthRequiredExcept…

…ion, and pass a message.
  • Loading branch information...
1 parent 1c95a90 commit b52b52aab9ebaaf2682be6aebafe83cfa4ad4aa5 @cdujeu cdujeu committed Oct 13, 2016
Showing with 3 additions and 1 deletion.
  1. +3 −1 core/src/core/src/pydio/Core/Http/Middleware/AuthMiddleware.php
@@ -32,6 +32,7 @@
use Pydio\Core\Model\ContextInterface;
use Pydio\Core\PluginFramework\PluginsService;
+use Pydio\Core\Services\AuthService;
use Pydio\Core\Services\ConfService;
use Zend\Diactoros\Response\EmptyResponse;
@@ -68,7 +69,8 @@ public static function handleRequest(\Psr\Http\Message\ServerRequestInterface $r
} catch (NoActiveWorkspaceException $ex){
- throw new AuthRequiredException();
+ AuthService::disconnect();
+ throw new AuthRequiredException("", $ex->getMessage());
} catch(ActionNotFoundException $a){

0 comments on commit b52b52a

Please sign in to comment.