public function register() { $this->app->alias('customerauth', 'App\\Auth\\CustomerAuthManager'); $this->app->alias('customerauth.driver', 'App\\Auth\\SiteGuard'); $this->app->alias('customerauth.driver', 'App\\Contracts\\Auth\\SiteGuard'); parent::register(); }
/** * Bootstrap the application events. * * @return void */ public function boot() { $app = $this->app; $this->app->bind('auth', function ($app) { return new AuthManager($app); }); $this->registerEvents(); parent::boot(); }
public function register() { /* * Register the Session Service Provider */ $this->app->register(MultiAuthSessionServiceProvider::class); /* * Call the register from the parent */ parent::register(); }
/** * Register the service provider. * * @return void */ public function register() { $driver = $this->app['config']['auth.driver']; if ($driver === 'wordpress') { $this->app->bindShared('auth', function ($app) { // Once the authentication service has actually been requested by the developer // we will set a variable in the application indicating such. This helps us // know that we need to set any queued cookies in the after event later. $app['auth.loaded'] = true; $auth = new WpAuth($app); $auth->setDispatcher($app['events']); return $auth; }); } else { parent::register(); } }
/** * Register the service provider. * * @return void */ public function register() { parent::register(); $app = $this->app; $app['google-client'] = $app->share(function ($app) { $client = new \Google_Client(); $client->setApplicationName($app['config']->get('l4-google-api::clientId')); $client->setClientId($app['config']->get('l4-google-api::clientId')); $client->setClientSecret($app['config']->get('l4-google-api::clientSecret')); $client->setRedirectUri($app['config']->get('l4-google-api::redirectUri')); $client->setDeveloperKey($app['config']->get('l4-google-api::developerKey')); $client->setScopes($app['config']->get('l4-google-api::scopes', array('https://www.googleapis.com/auth/userinfo.profile', 'https://www.googleapis.com/auth/userinfo.email'))); $client->setAccessType($app['config']->get('l4-google-api::access_type', 'offline')); return $client; }); $app['router']->filter('google-finish-authentication', function ($route, $request) use($app) { return $app['auth']->finishAuthenticationIfRequired(); }); }
/** * Register the service provider. * * @return void */ public function register() { parent::register(); $app = $this->app; $app['google-client'] = $app->share(function ($app) { $client = new \Google_Client(); $client->setApplicationName($app['config']->get('google::clientId')); $client->setClientId($app['config']->get('google::clientId')); $client->setClientSecret($app['config']->get('google::clientSecret')); $client->setRedirectUri($app['config']->get('google::redirectUri')); $client->setDeveloperKey($app['config']->get('google::developerKey')); $client->setScopes($app['config']->get('google::scopes')); $client->setAccessType($app['config']->get('google::access_type')); return $client; }); $app['router']->filter('google-finish-authentication', function ($route, $request) use($app) { return $app['auth']->finishAuthenticationIfRequired(); }); }
/** * Register the service provider. * * @return void */ public function register() { parent::register(); $this->registerPolicyAfterResolvingHandler(); }