app['auth']->provider('service', function ($app, array $config) { $class = '\\'.ltrim($config['name'], '\\'); if (class_implements($class)[UserProvider::class]) { return $app->make($class); } return new ServiceUserProvider($app->make($class)); }); $this->app->configure('jwt'); $this->extendAuthGuard(); $this->app['tymon.jwt.parser']->setChain([ AuthHeaders::class => new AuthHeaders, InputSource::class => (new InputSource)->setKey('access_token'), ]); } }