Björn eda453c677 | 5 years ago | |
---|---|---|
src/Gear/Auth | 5 years ago | |
README.md | 5 years ago | |
composer.json | 5 years ago |
// routes that are ignored by auth
$routes = array(
'/',
);
$app->register('auth', 'Gear\Middleware\AuthMiddleware', array($routes));
// adding jwtHelper
$options = array(
env('JWT_SECRET'),
env('JWT_URL'),
env('JWT_EXPIRED_AT'),
);
$app->register('jwtHelper', 'Gear\Helpers\JwtHelper', $options);
// adding filters
$app->before('start', array(new Gear\Filters\AuthFilter, 'before'));