forked from loafle/openapi-generator-original
[Slim] Fix AbstractAuthenticator constructor TypeError (#2641)
* Fix AbstractAuthenticator constructor TypeError * Refresh samples * Remove container argument reassign * Refresh samples
This commit is contained in:
parent
687b5aabf3
commit
c88b0a10b7
@ -116,14 +116,17 @@ class SlimRouter
|
|||||||
/**
|
/**
|
||||||
* Class constructor
|
* Class constructor
|
||||||
*
|
*
|
||||||
* @param ContainerInterface|array $container Either a ContainerInterface or an associative array of app settings
|
* @param ContainerInterface|array $settings Either a ContainerInterface or an associative array of app settings
|
||||||
*
|
*
|
||||||
* @throws InvalidArgumentException When no container is provided that implements ContainerInterface
|
* @throws InvalidArgumentException When no container is provided that implements ContainerInterface
|
||||||
* @throws Exception When implementation class doesn't exists
|
* @throws Exception When implementation class doesn't exists
|
||||||
*/
|
*/
|
||||||
public function __construct($container = [])
|
public function __construct($settings = [])
|
||||||
{
|
{
|
||||||
$this->slimApp = new App($container);
|
$this->slimApp = new App($settings);
|
||||||
|
|
||||||
|
// middlewares requires Psr\Container\ContainerInterface
|
||||||
|
$container = $this->slimApp->getContainer();
|
||||||
|
|
||||||
{{#hasAuthMethods}}
|
{{#hasAuthMethods}}
|
||||||
$authPackage = '{{authPackage}}';
|
$authPackage = '{{authPackage}}';
|
||||||
|
@ -577,14 +577,17 @@ class SlimRouter
|
|||||||
/**
|
/**
|
||||||
* Class constructor
|
* Class constructor
|
||||||
*
|
*
|
||||||
* @param ContainerInterface|array $container Either a ContainerInterface or an associative array of app settings
|
* @param ContainerInterface|array $settings Either a ContainerInterface or an associative array of app settings
|
||||||
*
|
*
|
||||||
* @throws InvalidArgumentException When no container is provided that implements ContainerInterface
|
* @throws InvalidArgumentException When no container is provided that implements ContainerInterface
|
||||||
* @throws Exception When implementation class doesn't exists
|
* @throws Exception When implementation class doesn't exists
|
||||||
*/
|
*/
|
||||||
public function __construct($container = [])
|
public function __construct($settings = [])
|
||||||
{
|
{
|
||||||
$this->slimApp = new App($container);
|
$this->slimApp = new App($settings);
|
||||||
|
|
||||||
|
// middlewares requires Psr\Container\ContainerInterface
|
||||||
|
$container = $this->slimApp->getContainer();
|
||||||
|
|
||||||
$authPackage = 'OpenAPIServer\Auth';
|
$authPackage = 'OpenAPIServer\Auth';
|
||||||
$basicAuthenticator = function (ServerRequestInterface &$request, TokenSearch $tokenSearch) use ($authPackage) {
|
$basicAuthenticator = function (ServerRequestInterface &$request, TokenSearch $tokenSearch) use ($authPackage) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user