/** * Register the service provider. * * @return void */ public function register() { $this->app->bindShared('authentication/twitter', function ($app, $callback = '/ccm/system/authentication/oauth2/twitter/callback/') { /** @var ServiceFactory $factory */ $factory = $app->make('oauth/factory/service'); return $factory->createService('twitter', new Credentials(\Config::get('auth.twitter.appid'), \Config::get('auth.twitter.secret'), (string) \URL::to($callback)), new SymfonySession(\Session::getFacadeRoot(), false)); }); }
/** * Register the service provider. */ public function register() { $this->app->bindShared('authentication/facebook', function ($app, $callback = '/ccm/system/authentication/oauth2/facebook/callback/') { /* @var ServiceFactory $factory */ $config = $app->make('config'); $factory = $app->make('oauth/factory/service', array(CURLOPT_SSL_VERIFYPEER => $config->get('app.curl.verifyPeer'))); return $factory->createService('facebook', new Credentials($config->get('auth.facebook.appid'), $config->get('auth.facebook.secret'), (string) \URL::to($callback)), new SymfonySession(\Session::getFacadeRoot(), false), array('email')); }); }
/** * Register the service provider. * * @return void */ public function register() { /** @var ExtractorFactory $factory */ $extractor = $this->app->make('oauth/factory/extractor'); $extractor->addExtractorMapping('OAuth\\OAuth2\\Service\\Google', 'Concrete\\Core\\Authentication\\Type\\Google\\Extractor\\Google'); $this->app->bindShared('authentication/google', function (Application $app, $callback = '/ccm/system/authentication/oauth2/google/callback/') { /** @var ServiceFactory $factory */ $factory = $app->make('oauth/factory/service', array(CURLOPT_SSL_VERIFYPEER => Config::get('app.curl.verifyPeer'))); return $factory->createService('google', new Credentials(\Config::get('auth.google.appid'), \Config::get('auth.google.secret'), (string) \URL::to($callback)), new SymfonySession(\Session::getFacadeRoot(), false), array(Google::SCOPE_EMAIL, Google::SCOPE_PROFILE)); }); }
/** * Register the service provider. * * @return void */ public function register() { /** @var ExtractorFactory $extractor */ $extractor = $this->app->make('oauth/factory/extractor'); $extractor->addExtractorMapping('Concrete\\Core\\Authentication\\Type\\Community\\Service\\Community', 'Concrete\\Core\\Authentication\\Type\\Community\\Extractor\\Community'); /** @var ServiceFactory $factory */ $factory = $this->app->make('oauth/factory/service'); $factory->registerService('community', '\\Concrete\\Core\\Authentication\\Type\\Community\\Service\\Community'); $this->app->bindShared('authentication/community', function ($app, $callback = '/ccm/system/authentication/oauth2/community/callback/') use($factory) { return $factory->createService('community', new Credentials(\Config::get('auth.community.appid'), \Config::get('auth.community.secret'), (string) \URL::to($callback)), new SymfonySession(\Session::getFacadeRoot(), false)); }); }
public function register() { /** @var ExtractorFactory $extractor */ $extractor = $this->app->make('oauth/factory/extractor'); $extractor->addExtractorMapping('Concrete\\Package\\Worldskills\\Authentication\\Service', 'Concrete\\Package\\Worldskills\\Authentication\\Extractor'); /** @var ServiceFactory $factory */ $factory = $this->app->make('oauth/factory/service'); $factory->registerService('worldskills', '\\Concrete\\Package\\Worldskills\\Authentication\\Service'); $this->app->bindShared('authentication/worldskills', function ($app, $callback = '/ccm/system/authentication/oauth2/worldskills/callback/') use($factory) { $credentials = new Credentials(\Config::get('auth.worldskills.appid'), \Config::get('auth.worldskills.secret'), (string) \URL::to($callback)); $session = new SymfonySession(\Session::getFacadeRoot(), false); return $factory->createService('worldskills', $credentials, $session); }); }
/** * Returns a valid property * * @param $name * @return mixed */ private function resolveProperty($name) { $name = strtolower($name); switch ($name) { case 'artisan': // 'Illuminate\Contracts\Console\Kernel' return \Artisan::getFacadeRoot(); break; case 'auth': // Illuminate\Auth\Guard return \Auth::getFacadeRoot(); break; case 'cache': // Illuminate\Cache\CacheManager return \Cache::getFacadeRoot(); break; case 'config': // Illuminate\Config\Repository return \Config::getFacadeRoot(); break; case 'cookie': // Illuminate\Cookie\CookieJar return \Cookie::getFacadeRoot(); break; case 'container': // Illuminate\Container\Container return \App::getFacadeRoot(); break; case 'db': // Illuminate\Database\DatabaseManager return \DB::getFacadeRoot(); break; case 'file': // Illuminate\Filesystem\Filesystem return \File::getFacadeRoot(); break; case 'event': // Illuminate\Config\Repository return \Event::getFacadeRoot(); break; case 'exception': // DeviseException return DeviseException::getFacadeRoot(); break; case 'hash': // Illuminate\Hashing\BcryptHasher return \Hash::getFacadeRoot(); break; case 'input': // Illuminate\Http\Request return \Input::getFacadeRoot(); break; case 'lang': // Illuminate\Translation\Translator return \Lang::getFacadeRoot(); break; case 'mail': // Illuminate\Mail\Mailer return \Mail::getFacadeRoot(); break; case 'paginator': return new DevisePaginator(); break; case 'password': // Illuminate\Auth\Reminders\PasswordBroker return \Password::getFacadeRoot(); break; case 'redirect': // Illuminate\Routing\Redirector return \Redirect::getFacadeRoot(); break; case 'response': // DeviseResponse return DeviseResponse::getFacadeRoot(); break; case 'request': // Illuminate\Http\Request return \Request::getFacadeRoot(); break; case 'route': // Illuminate\Routing\Router return \Route::getFacadeRoot(); break; case 'schema': return \Schema::getFacadeRoot(); break; case 'session': // Illuminate\Session\SessionManager return \Session::getFacadeRoot(); break; case 'url': // Illuminate\Routing\UrlGenerator return \URL::getFacadeRoot(); break; case 'validator': // Illuminate\Validation\Factory return \Validator::getFacadeRoot(); break; case 'view': // Illuminate\View\Factory return \View::getFacadeRoot(); break; } return null; }