moved RemoteUserAuthenticate before Authenticate

Having RemoteUserAuthenticate after Authenticate does nothing - a request requiring a login was already redirected away before reaching the logic to load the user from the REMOTE_USER server setting.

Moving RemoteUserAuthenticate before Authenticate fixes this.
This commit is contained in:
Sven Speckmaier
2020-02-27 10:36:38 +01:00
committed by GitHub
parent c92cc43042
commit 5f426f9be9

View File

@@ -151,8 +151,8 @@ class RouteServiceProvider extends ServiceProvider
];
if ($applyAlwaysAuthenticate && !$this->isWhiteListedAuthRoute($routes)) {
$middleware[] = Authenticate::class;
$middleware[] = RemoteUserAuthenticate::class;
$middleware[] = Authenticate::class;
}
$router->group(['middleware' => $middleware], function (Router $router) use ($routes) {