Files
This commit is contained in:
15
setup/setups/02_auth.php
Normal file
15
setup/setups/02_auth.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
use Psr\Container\ContainerInterface as Container;
|
||||
|
||||
return [
|
||||
Incoviba\API\Common\Service\Auth::class => function(Container $c) {
|
||||
return new Incoviba\API\Common\Service\Auth($c->get('AUTH_KEY'));
|
||||
},
|
||||
Incoviba\API\Common\Middleware\Auth::class => function(Container $c) {
|
||||
return new Incoviba\API\Common\Middleware\Auth(
|
||||
$c->get(Incoviba\API\Common\Service\Auth::class),
|
||||
$c->get(Slim\Psr7\Factory\ResponseFactory::class),
|
||||
['/auth/generate']
|
||||
);
|
||||
}
|
||||
];
|
Reference in New Issue
Block a user