Get a provider service given a provider name

@param  string $provider
@return OAuth\Common\Service\ServiceInterface
351235
public function getServiceByProvider($provider)
    {
        $redirect = $this->url($this->config[$provider]['callback_route'], array(
            'provider' => $provider,
        ));

        $serviceName = $this->serviceMap[$provider];
        $storage     = new SessionStorage(false);
        $credentials = new ConsumerCredentials(
            $this->config[$provider]['key'],
            $this->config[$provider]['secret'],
            $redirect
        );

        $service = $this->serviceFactory->createService(
            $serviceName,
            $credentials,
            $storage,
            $this->config[$provider]['scope']
        );

        return $service;
    }
202178
public function getProvider($provider)
    {
        if (isset($this->aProviders['all'][strtolower($provider)])) {
            return $this->aProviders['all'][strtolower($provider)];
        } else {
            return false;
        }
    }
1195568
public function buildProvider($provider, $config)
    {
        return new $provider(
            $this->app['request'], $config['client_id'],
            $config['client_secret'], $this->formatRedirectUrl($config),
            Arr::get($config, 'guzzle', [])
        );
    }
1238131
public function getProvider(): AbstractProvider
    {
        $class = $this->providerClass();

        return new $class([
            'clientId'     => $this->clientId,
            'clientSecret' => $this->clientSecret,
            'redirectUri'  => $this->redirectUrl,
        ]);
    }
515176
public function provider( $provider ) {

		if ( is_string( $provider ) ) {
			$provider = $this->resolveProvider( $provider );
		}

		$this->providers[] = $provider;
	}
928975
public function getRegistered($provider)
    {
        $name = is_string($provider) ? $provider : get_class($provider);

        if (array_key_exists($name, $this->loadedProviders)) {
            return array_first($this->serviceProviders, function($key, $value) use ($name)
            {
                return get_class($value) == $name;
            });
        }
    }
760337
public function registerProvider(Provider $provider): self
    {
        $this->providers[$provider->getName()] = $provider;

        return $this;
    }
1072635
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config    = $serviceLocator->get('BjyAuthorize\Config');
        $providers = array();

        foreach ($config[static::PROVIDER_SETTING] as $providerName => $providerConfig) {
            if ($serviceLocator->has($providerName)) {
                $providers[] = $serviceLocator->get($providerName);
            } else {
                $providers[] = new $providerName($providerConfig, $serviceLocator);
            }
        }

        return $providers;
    }
436114
def get_provider(self, provider_name='default'):
        """"""
        try:
            if self._providers is None:
                self._providers = self._initialize_providers()
            return self._providers[provider_name]
        except KeyError:
            raise AssertionError(f'No Provider registered with name {provider_name}')
1271189
protected function getProvider($provider)
    {
        $provider = $this->lowerize((trim($provider)));
        $provider = array_key_exists($provider, $this->providers)
            ? $this->providers[$provider]
            : $this->providers['google_maps'];

        return '\\Geocoder\\Provider\\' . $provider . $provider;
    }
21588
public static function create(ProviderInterface $provider, array $config)
    {
        return OAuth1Factory::create(
            array_merge($provider->getUriConfig(), $config),
            $provider->getSigner()
        );
    }
102933
public function provider($name, $provider)
    {
        if (!is_array($provider) && is_callable($provider)) {
            $provider = [$provider];
        }
        if (!is_array($provider)) {
            throw new DependencyException(
                'Invalid provider passed to '.$name.', '.
                'it must be an array or a callable function.'
            );
        }

        $dependencies = $provider;
        $value = array_pop($dependencies);

        return $this->set($name, new Dependency($value, $name, $dependencies));
    }
1257239
public function handleProviderCallback($provider)
    {
        try {
            $user = $this->socialProvider->driver($provider)->user();
        } catch (Exception $e) {
            return Redirect::to('auth/' . $provider);
        }

        $this->auth->login($this->users->provider($provider)->findOrCreateUser($user), true);

        return redirect()->intended($this->redirectPath());
    }
943349
public function make(Provider $provider)
    {
        $composer = new ColumnComposer($provider, $this->versionEngine, $this->viewFactory, $this->configRepository);
        return $composer;
    }
677920
protected function resolveProvider($provider): ServiceProviderInterface
    {
        // If the given "provider" is a string, we will resolve it.
        // This is simply a more convenient way of specifying your service provider classes.
        if (is_string($provider) && class_exists($provider)) {
            $provider = new $provider();
        }

        // TODO : voir si on garder ce throw car de toute facon le typehint va lever une exception.
        if (! $provider instanceof ServiceProviderInterface) {
            throw new InvalidArgumentException(
                sprintf('The provider must be an instance of "%s" or a valid class name.',
                    ServiceProviderInterface::class)
            );
        }

        return $provider;
    }
538834
public static function GetBaseUriWithProvider( $context, $provider )
	{
		return ExtFuncs::GetBaseUri( $context, CoreFuncs::NodeValue( CoreFuncs::ContextNode( $provider ) ) );
	}
99465
private function getProvider()
    {
        $app = $this->app;

        $version = intval($app::VERSION);

        switch ($version) {
            case 4:
              return new ServiceProviderLaravel4($app);

            case 5:
              return new ServiceProviderLaravel5($app);

            default:
              throw new RuntimeException('Your version of Laravel is not supported');
        }
    }