Exemplo n.º 1
0
 /**
  * Boot Oci8 Provider
  */
 public function boot()
 {
     $this->publishes([__DIR__ . '/../config/oracle.php' => config_path('oracle.php')], 'oracle');
     Auth::provider('oracle', function ($app, array $config) {
         return new OracleUserProvider($app['hash'], $config['model']);
     });
 }
Exemplo n.º 2
0
 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     $this->publishes([__DIR__ . '/config/ldap.php' => config_path('ldap.php')]);
     Auth::provider('ldap', function ($app, array $config) {
         return new LdapAuthUserProvider($app['hash'], $config['model']);
     });
 }
 /**
  * Register any application authentication / authorization services.
  *
  * @param  \Illuminate\Contracts\Auth\Access\Gate  $gate
  * @return void
  */
 public function boot(GateContract $gate)
 {
     Auth::provider('riak', function ($app, array $config) {
         // Return an instance of Illuminate\Contracts\Auth\UserProvider...
         return new RiakUserProvider();
     });
 }
Exemplo n.º 4
0
 /**
  * Register the helpers file.
  */
 public function registerHelpers()
 {
     require __DIR__ . '/helpers.php';
     Auth::provider('one-auth', function ($app, array $config) {
         $userRepository = App::make(UserRepository::class);
         return new OneAuthUserProvider($userRepository);
     });
     $this->publishes([__DIR__ . '/../config/config.php' => config_path('one-auth.php')]);
 }
 /**
  * Perform post-registration booting of services.
  *
  * @return void
  */
 public function boot()
 {
     // Register 'ldap' as authentication method
     Auth::provider('ldap', function ($app) {
         // Create new LDAP connection based on configuration files
         $ldap = new Ldap($this->getLdapConfig());
         return new LdapAuthUserProvider($ldap, $app['config']['auth']['providers']['ldap-users']['model']);
     });
 }
Exemplo n.º 6
0
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     // Register 'ldap' as authentication method
     Auth::provider('ldap', function ($app) {
         $model = $app['config']['auth']['providers']['ldap-users']['model'];
         // Create a new LDAP connection
         $connection = new Ldap($this->getLdapConfig());
         return new LdapAuthUserProvider($connection, $model);
     });
 }
Exemplo n.º 7
0
 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     Auth::provider('neo4j', function () {
         // Return an instance of Illuminate\Contracts\Auth\UserProvider...
         return new Neo4jUserProvider();
     });
     Validator::extend('jsonMax', function ($attribute, $value, $parameters, $validator) {
         return count(json_decode($value)) <= array_shift($parameters);
     });
 }
 /**
  * Run service provider boot operations.
  *
  * @return void
  */
 public function boot()
 {
     $auth = __DIR__ . '/Config/auth.php';
     // Add publishable configuration.
     $this->publishes([$auth => config_path('adldap_auth.php')], 'adldap');
     $this->mergeConfigFrom($auth, 'adldap_auth');
     // Register the adldap auth user provider.
     Auth::provider('adldap', function ($app, array $config) {
         return new AdldapAuthUserProvider($app['hash'], $config['model']);
     });
 }
Exemplo n.º 9
0
 /**
  * Setup parse.
  *
  * @return void
  */
 protected function setupParse()
 {
     $config = $this->app->config->get('parse');
     ParseClient::setStorage(new SessionStorage());
     ParseClient::initialize($config['app_id'], $config['rest_key'], $config['master_key']);
     ParseClient::setServerURL($config['server_url'], $config['mount_path']);
     Auth::provider('parse', function ($app, array $config) {
         return new UserProvider($config['model']);
     });
     Auth::provider('parse-facebook', function ($app, array $config) {
         return new FacebookUserProvider($config['model']);
     });
     Auth::provider('parse-any', function ($app, array $config) {
         return new AnyUserProvider($config['model']);
     });
 }
 /**
  * Perform post-registration booting of services.
  *
  * @return void
  */
 public function boot()
 {
     // Publish configuration
     $this->publishes([__DIR__ . '/../../config/contactable.php' => config_path('contactable.php')], 'config');
     // Publish migrations
     $this->publishes([__DIR__ . '/../Migrations/' => database_path('migrations')], 'migrations');
     // Load views
     $this->loadViewsFrom(__DIR__ . '/../../resources/views/', 'contactable');
     // Bind the authentication provider
     app()->bind('ContactableAuthProvider', function () {
         return new ContactableAuthProvider(app('hash'), config('auth.providers.users.model', \App\User::class));
     });
     // Add authentication driver
     Auth::provider('contactable', function ($app) {
         // Return an instance of Illuminate\Contracts\Auth\UserProvider...
         return $app->make('ContactableAuthProvider');
     });
 }