private function registerClient() { $id = config('stormpath.client.apiKey.id'); $secret = config('stormpath.client.apiKey.secret'); Client::$apiKeyProperties = "apiKey.id={$id}\napiKey.secret={$secret}"; Client::$integration = self::INTEGRATION_NAME . "/" . self::INTEGRATION_VERSION; $this->app->singleton('stormpath.client', function () { return Client::getInstance(); }); }
/** * Register bindings in the container. * * @return void */ public function register() { $this->app->singleton('stormpath.client', function ($app) { Client::$apiKeyProperties = "apiKey.id=" . config('stormpath.id') . "\napiKey.secret=" . config('stormpath.secret'); Client::$integration = self::INTEGRATION_NAME . "/" . self::INTEGRATION_VERSION; return Client::getInstance(); }); $this->app->singleton('stormpath.application', function ($app) { $application = $app['stormpath.client']->get('applications/' . config('stormpath.application'), STORMPATH::APPLICATION); return $application; }); }
private function registerClient() { $id = config('stormpath.client.apiKey.id'); $secret = config('stormpath.client.apiKey.secret'); Client::$apiKeyProperties = "apiKey.id={$id}\napiKey.secret={$secret}"; Client::$integration = $this->buildAgent(); $this->app->singleton('stormpath.client', function () { return Client::getInstance(); }); }