Ejemplo n.º 1
0
 public function __construct()
 {
     $oldInfoHeaders = ApiClient::getInfoHeadersData();
     if ($oldInfoHeaders) {
         $infoHeaders = InformationHeaders::Extend($oldInfoHeaders);
         $infoHeaders->setEnvironment('Symfony', Kernel::VERSION);
         $infoHeaders->setPackage('jwt-auth-bundle', self::SDK_VERSION);
         ApiClient::setInfoHeadersData($infoHeaders);
     }
 }
 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     \Auth::provider('auth0', function ($app, array $config) {
         $userRepository = \App::make(\Auth0\Login\Contract\Auth0UserRepository::class);
         return new Auth0UserProvider($userRepository);
     });
     $this->publishes([__DIR__ . '/../../config/config.php' => config_path('laravel-auth0.php')]);
     $laravel = app();
     $oldInfoHeaders = ApiClient::getInfoHeadersData();
     if ($oldInfoHeaders) {
         $infoHeaders = InformationHeaders::Extend($oldInfoHeaders);
         $infoHeaders->setEnvironment('Laravel', $laravel::VERSION);
         $infoHeaders->setPackage('laravel-auth0', self::SDK_VERSION);
         ApiClient::setInfoHeadersData($infoHeaders);
     }
 }