Closed witchi closed 3 years ago
Ahh, I can use "before" and inject the user/password into the request attributes, which I can extract with $req->getAttribute() later. And the request will be cloned, so I have to use something like this:
"before" => function ($request, $arguments) {
return $request->withAttribute("user", $arguments["user"])->withAttribute("passwd", $arguments["password"]);
}
I have an own Authenticator (implements AuthenticatorInterface), where I can check the user/password. But I also need both parameters later within the Slim route handler because I have to send the same credentials to a further webservice: