socialite providers
This commit is contained in:
2
.env
2
.env
@@ -10,7 +10,7 @@ DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=w4rpservices2
|
||||
DB_USERNAME=w4rpservices
|
||||
DB_USERNAME=minerva
|
||||
DB_PASSWORD=FuckingShit12
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"laravel/ui": "^2.0",
|
||||
"laravelcollective/html": "^6.0",
|
||||
"predis/predis": "^1.1",
|
||||
"socialiteproviders/manager": "^4.0",
|
||||
"spatie/laravel-rate-limited-job-middleware": "^1.5",
|
||||
"twbs/bootstrap": "^4.5",
|
||||
"web-token/jwt-easy": "^2.2",
|
||||
|
||||
69
composer.lock
generated
69
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "351c6a21f60967e95e902b9f70f8ed7b",
|
||||
"content-hash": "83223e04c66a8cd1187f8679792e00ad",
|
||||
"packages": [
|
||||
{
|
||||
"name": "brick/math",
|
||||
@@ -2585,6 +2585,73 @@
|
||||
],
|
||||
"time": "2020-08-18T17:17:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "socialiteproviders/manager",
|
||||
"version": "4.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/SocialiteProviders/Manager.git",
|
||||
"reference": "0f5e82af0404df0080bdc5c105cef936c1711524"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/SocialiteProviders/Manager/zipball/0f5e82af0404df0080bdc5c105cef936c1711524",
|
||||
"reference": "0f5e82af0404df0080bdc5c105cef936c1711524",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/support": "^6.0|^7.0|^8.0",
|
||||
"laravel/socialite": "~4.0|~5.0",
|
||||
"php": "^7.2 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.2",
|
||||
"phpunit/phpunit": "^9.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"SocialiteProviders\\Manager\\ServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"SocialiteProviders\\Manager\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Andy Wendt",
|
||||
"email": "andy@awendt.com"
|
||||
},
|
||||
{
|
||||
"name": "Anton Komarev",
|
||||
"email": "a.komarev@cybercog.su"
|
||||
},
|
||||
{
|
||||
"name": "Miguel Piedrafita",
|
||||
"email": "soy@miguelpiedrafita.com"
|
||||
},
|
||||
{
|
||||
"name": "atymic",
|
||||
"email": "atymicq@gmail.com",
|
||||
"homepage": "https://atymic.dev"
|
||||
}
|
||||
],
|
||||
"description": "Easily add new or override built-in providers in Laravel Socialite.",
|
||||
"homepage": "https://socialiteproviders.com/",
|
||||
"support": {
|
||||
"issues": "https://github.com/SocialiteProviders/Manager/issues",
|
||||
"source": "https://github.com/SocialiteProviders/Manager/tree/4.0.1"
|
||||
},
|
||||
"time": "2020-12-01T23:09:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "spatie/laravel-rate-limited-job-middleware",
|
||||
"version": "1.5.0",
|
||||
|
||||
0
storage/app/public/moon_data.txt
Normal file → Executable file
0
storage/app/public/moon_data.txt
Normal file → Executable file
0
storage/app/public/moon_data_noformat.txt
Normal file → Executable file
0
storage/app/public/moon_data_noformat.txt
Normal file → Executable file
13
vendor/composer/InstalledVersions.php
vendored
13
vendor/composer/InstalledVersions.php
vendored
@@ -29,7 +29,7 @@ private static $installed = array (
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '0a11a5d23d14c0dbc4537b5219a99b5ffa1a03fd',
|
||||
'reference' => '4b72a59e62d368371546246a68aef55ee21c2705',
|
||||
'name' => 'laravel/laravel',
|
||||
),
|
||||
'versions' =>
|
||||
@@ -463,7 +463,7 @@ private static $installed = array (
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '0a11a5d23d14c0dbc4537b5219a99b5ffa1a03fd',
|
||||
'reference' => '4b72a59e62d368371546246a68aef55ee21c2705',
|
||||
),
|
||||
'laravel/socialite' =>
|
||||
array (
|
||||
@@ -928,6 +928,15 @@ private static $installed = array (
|
||||
),
|
||||
'reference' => '99732be0ddb3361e16ad77b68ba41efc8e979019',
|
||||
),
|
||||
'socialiteproviders/manager' =>
|
||||
array (
|
||||
'pretty_version' => '4.0.1',
|
||||
'version' => '4.0.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '0f5e82af0404df0080bdc5c105cef936c1711524',
|
||||
),
|
||||
'spatie/laravel-rate-limited-job-middleware' =>
|
||||
array (
|
||||
'pretty_version' => '1.5.0',
|
||||
|
||||
17
vendor/composer/autoload_classmap.php
vendored
17
vendor/composer/autoload_classmap.php
vendored
@@ -117,7 +117,6 @@ return array(
|
||||
'App\\Models\\Lookups\\CorporationLookup' => $baseDir . '/app/Models/Lookups/CorporationLookup.php',
|
||||
'App\\Models\\Lookups\\ItemLookup' => $baseDir . '/app/Models/Lookups/ItemLookup.php',
|
||||
'App\\Models\\Lookups\\SolarSystem' => $baseDir . '/app/Models/Lookups/SolarSystem.php',
|
||||
'App\\Models\\Mail\\EveMail' => $baseDir . '/app/Models/Mail/EveMail.php',
|
||||
'App\\Models\\Mail\\SentMail' => $baseDir . '/app/Models/Mail/SentMail.php',
|
||||
'App\\Models\\MiningTax\\Invoice' => $baseDir . '/app/Models/MiningTax/Invoice.php',
|
||||
'App\\Models\\MiningTax\\Ledger' => $baseDir . '/app/Models/MiningTax/Ledger.php',
|
||||
@@ -4116,6 +4115,22 @@ return array(
|
||||
'SebastianBergmann\\Type\\UnknownType' => $vendorDir . '/sebastian/type/src/UnknownType.php',
|
||||
'SebastianBergmann\\Type\\VoidType' => $vendorDir . '/sebastian/type/src/VoidType.php',
|
||||
'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php',
|
||||
'SocialiteProviders\\Manager\\Config' => $vendorDir . '/socialiteproviders/manager/src/Config.php',
|
||||
'SocialiteProviders\\Manager\\ConfigTrait' => $vendorDir . '/socialiteproviders/manager/src/ConfigTrait.php',
|
||||
'SocialiteProviders\\Manager\\Contracts\\ConfigInterface' => $vendorDir . '/socialiteproviders/manager/src/Contracts/ConfigInterface.php',
|
||||
'SocialiteProviders\\Manager\\Contracts\\Helpers\\ConfigRetrieverInterface' => $vendorDir . '/socialiteproviders/manager/src/Contracts/Helpers/ConfigRetrieverInterface.php',
|
||||
'SocialiteProviders\\Manager\\Contracts\\OAuth1\\ProviderInterface' => $vendorDir . '/socialiteproviders/manager/src/Contracts/OAuth1/ProviderInterface.php',
|
||||
'SocialiteProviders\\Manager\\Contracts\\OAuth2\\ProviderInterface' => $vendorDir . '/socialiteproviders/manager/src/Contracts/OAuth2/ProviderInterface.php',
|
||||
'SocialiteProviders\\Manager\\Exception\\InvalidArgumentException' => $vendorDir . '/socialiteproviders/manager/src/Exception/InvalidArgumentException.php',
|
||||
'SocialiteProviders\\Manager\\Exception\\MissingConfigException' => $vendorDir . '/socialiteproviders/manager/src/Exception/MissingConfigException.php',
|
||||
'SocialiteProviders\\Manager\\Helpers\\ConfigRetriever' => $vendorDir . '/socialiteproviders/manager/src/Helpers/ConfigRetriever.php',
|
||||
'SocialiteProviders\\Manager\\OAuth1\\AbstractProvider' => $vendorDir . '/socialiteproviders/manager/src/OAuth1/AbstractProvider.php',
|
||||
'SocialiteProviders\\Manager\\OAuth1\\Server' => $vendorDir . '/socialiteproviders/manager/src/OAuth1/Server.php',
|
||||
'SocialiteProviders\\Manager\\OAuth1\\User' => $vendorDir . '/socialiteproviders/manager/src/OAuth1/User.php',
|
||||
'SocialiteProviders\\Manager\\OAuth2\\AbstractProvider' => $vendorDir . '/socialiteproviders/manager/src/OAuth2/AbstractProvider.php',
|
||||
'SocialiteProviders\\Manager\\OAuth2\\User' => $vendorDir . '/socialiteproviders/manager/src/OAuth2/User.php',
|
||||
'SocialiteProviders\\Manager\\ServiceProvider' => $vendorDir . '/socialiteproviders/manager/src/ServiceProvider.php',
|
||||
'SocialiteProviders\\Manager\\SocialiteWasCalled' => $vendorDir . '/socialiteproviders/manager/src/SocialiteWasCalled.php',
|
||||
'SolarSystemSeeder' => $baseDir . '/database/seeds/SolarSystemSeeder.php',
|
||||
'Spatie\\RateLimitedMiddleware\\RateLimited' => $vendorDir . '/spatie/laravel-rate-limited-job-middleware/src/RateLimited.php',
|
||||
'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
|
||||
|
||||
2
vendor/composer/autoload_files.php
vendored
2
vendor/composer/autoload_files.php
vendored
@@ -18,8 +18,8 @@ return array(
|
||||
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
|
||||
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
|
||||
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
|
||||
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php',
|
||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php',
|
||||
'2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php',
|
||||
'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php',
|
||||
'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php',
|
||||
|
||||
1
vendor/composer/autoload_psr4.php
vendored
1
vendor/composer/autoload_psr4.php
vendored
@@ -39,6 +39,7 @@ return array(
|
||||
'Symfony\\Component\\CssSelector\\' => array($vendorDir . '/symfony/css-selector'),
|
||||
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
|
||||
'Spatie\\RateLimitedMiddleware\\' => array($vendorDir . '/spatie/laravel-rate-limited-job-middleware/src'),
|
||||
'SocialiteProviders\\Manager\\' => array($vendorDir . '/socialiteproviders/manager/src'),
|
||||
'Seat\\Eseye\\' => array($vendorDir . '/eveseat/eseye/src'),
|
||||
'Ramsey\\Uuid\\' => array($vendorDir . '/ramsey/uuid/src'),
|
||||
'Ramsey\\Collection\\' => array($vendorDir . '/ramsey/collection/src'),
|
||||
|
||||
24
vendor/composer/autoload_static.php
vendored
24
vendor/composer/autoload_static.php
vendored
@@ -19,8 +19,8 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
||||
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
|
||||
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
|
||||
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => __DIR__ . '/..' . '/symfony/polyfill-iconv/bootstrap.php',
|
||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => __DIR__ . '/..' . '/symfony/polyfill-iconv/bootstrap.php',
|
||||
'2c102faa651ef8ea5874edb585946bce' => __DIR__ . '/..' . '/swiftmailer/swiftmailer/lib/swift_required.php',
|
||||
'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php',
|
||||
'e39a8b23c42d4e1452234d762b03835a' => __DIR__ . '/..' . '/ramsey/uuid/src/functions.php',
|
||||
@@ -85,6 +85,7 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
'Symfony\\Component\\CssSelector\\' => 30,
|
||||
'Symfony\\Component\\Console\\' => 26,
|
||||
'Spatie\\RateLimitedMiddleware\\' => 29,
|
||||
'SocialiteProviders\\Manager\\' => 27,
|
||||
'Seat\\Eseye\\' => 11,
|
||||
),
|
||||
'R' =>
|
||||
@@ -322,6 +323,10 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/spatie/laravel-rate-limited-job-middleware/src',
|
||||
),
|
||||
'SocialiteProviders\\Manager\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/socialiteproviders/manager/src',
|
||||
),
|
||||
'Seat\\Eseye\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/eveseat/eseye/src',
|
||||
@@ -652,7 +657,6 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
'App\\Models\\Lookups\\CorporationLookup' => __DIR__ . '/../..' . '/app/Models/Lookups/CorporationLookup.php',
|
||||
'App\\Models\\Lookups\\ItemLookup' => __DIR__ . '/../..' . '/app/Models/Lookups/ItemLookup.php',
|
||||
'App\\Models\\Lookups\\SolarSystem' => __DIR__ . '/../..' . '/app/Models/Lookups/SolarSystem.php',
|
||||
'App\\Models\\Mail\\EveMail' => __DIR__ . '/../..' . '/app/Models/Mail/EveMail.php',
|
||||
'App\\Models\\Mail\\SentMail' => __DIR__ . '/../..' . '/app/Models/Mail/SentMail.php',
|
||||
'App\\Models\\MiningTax\\Invoice' => __DIR__ . '/../..' . '/app/Models/MiningTax/Invoice.php',
|
||||
'App\\Models\\MiningTax\\Ledger' => __DIR__ . '/../..' . '/app/Models/MiningTax/Ledger.php',
|
||||
@@ -4651,6 +4655,22 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
'SebastianBergmann\\Type\\UnknownType' => __DIR__ . '/..' . '/sebastian/type/src/UnknownType.php',
|
||||
'SebastianBergmann\\Type\\VoidType' => __DIR__ . '/..' . '/sebastian/type/src/VoidType.php',
|
||||
'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php',
|
||||
'SocialiteProviders\\Manager\\Config' => __DIR__ . '/..' . '/socialiteproviders/manager/src/Config.php',
|
||||
'SocialiteProviders\\Manager\\ConfigTrait' => __DIR__ . '/..' . '/socialiteproviders/manager/src/ConfigTrait.php',
|
||||
'SocialiteProviders\\Manager\\Contracts\\ConfigInterface' => __DIR__ . '/..' . '/socialiteproviders/manager/src/Contracts/ConfigInterface.php',
|
||||
'SocialiteProviders\\Manager\\Contracts\\Helpers\\ConfigRetrieverInterface' => __DIR__ . '/..' . '/socialiteproviders/manager/src/Contracts/Helpers/ConfigRetrieverInterface.php',
|
||||
'SocialiteProviders\\Manager\\Contracts\\OAuth1\\ProviderInterface' => __DIR__ . '/..' . '/socialiteproviders/manager/src/Contracts/OAuth1/ProviderInterface.php',
|
||||
'SocialiteProviders\\Manager\\Contracts\\OAuth2\\ProviderInterface' => __DIR__ . '/..' . '/socialiteproviders/manager/src/Contracts/OAuth2/ProviderInterface.php',
|
||||
'SocialiteProviders\\Manager\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/socialiteproviders/manager/src/Exception/InvalidArgumentException.php',
|
||||
'SocialiteProviders\\Manager\\Exception\\MissingConfigException' => __DIR__ . '/..' . '/socialiteproviders/manager/src/Exception/MissingConfigException.php',
|
||||
'SocialiteProviders\\Manager\\Helpers\\ConfigRetriever' => __DIR__ . '/..' . '/socialiteproviders/manager/src/Helpers/ConfigRetriever.php',
|
||||
'SocialiteProviders\\Manager\\OAuth1\\AbstractProvider' => __DIR__ . '/..' . '/socialiteproviders/manager/src/OAuth1/AbstractProvider.php',
|
||||
'SocialiteProviders\\Manager\\OAuth1\\Server' => __DIR__ . '/..' . '/socialiteproviders/manager/src/OAuth1/Server.php',
|
||||
'SocialiteProviders\\Manager\\OAuth1\\User' => __DIR__ . '/..' . '/socialiteproviders/manager/src/OAuth1/User.php',
|
||||
'SocialiteProviders\\Manager\\OAuth2\\AbstractProvider' => __DIR__ . '/..' . '/socialiteproviders/manager/src/OAuth2/AbstractProvider.php',
|
||||
'SocialiteProviders\\Manager\\OAuth2\\User' => __DIR__ . '/..' . '/socialiteproviders/manager/src/OAuth2/User.php',
|
||||
'SocialiteProviders\\Manager\\ServiceProvider' => __DIR__ . '/..' . '/socialiteproviders/manager/src/ServiceProvider.php',
|
||||
'SocialiteProviders\\Manager\\SocialiteWasCalled' => __DIR__ . '/..' . '/socialiteproviders/manager/src/SocialiteWasCalled.php',
|
||||
'SolarSystemSeeder' => __DIR__ . '/../..' . '/database/seeds/SolarSystemSeeder.php',
|
||||
'Spatie\\RateLimitedMiddleware\\RateLimited' => __DIR__ . '/..' . '/spatie/laravel-rate-limited-job-middleware/src/RateLimited.php',
|
||||
'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
|
||||
|
||||
70
vendor/composer/installed.json
vendored
70
vendor/composer/installed.json
vendored
@@ -4512,6 +4512,76 @@
|
||||
"homepage": "https://github.com/sebastianbergmann/version",
|
||||
"install-path": "../sebastian/version"
|
||||
},
|
||||
{
|
||||
"name": "socialiteproviders/manager",
|
||||
"version": "4.0.1",
|
||||
"version_normalized": "4.0.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/SocialiteProviders/Manager.git",
|
||||
"reference": "0f5e82af0404df0080bdc5c105cef936c1711524"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/SocialiteProviders/Manager/zipball/0f5e82af0404df0080bdc5c105cef936c1711524",
|
||||
"reference": "0f5e82af0404df0080bdc5c105cef936c1711524",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/support": "^6.0|^7.0|^8.0",
|
||||
"laravel/socialite": "~4.0|~5.0",
|
||||
"php": "^7.2 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.2",
|
||||
"phpunit/phpunit": "^9.0"
|
||||
},
|
||||
"time": "2020-12-01T23:09:06+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"SocialiteProviders\\Manager\\ServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"SocialiteProviders\\Manager\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Andy Wendt",
|
||||
"email": "andy@awendt.com"
|
||||
},
|
||||
{
|
||||
"name": "Anton Komarev",
|
||||
"email": "a.komarev@cybercog.su"
|
||||
},
|
||||
{
|
||||
"name": "Miguel Piedrafita",
|
||||
"email": "soy@miguelpiedrafita.com"
|
||||
},
|
||||
{
|
||||
"name": "atymic",
|
||||
"email": "atymicq@gmail.com",
|
||||
"homepage": "https://atymic.dev"
|
||||
}
|
||||
],
|
||||
"description": "Easily add new or override built-in providers in Laravel Socialite.",
|
||||
"homepage": "https://socialiteproviders.com/",
|
||||
"support": {
|
||||
"issues": "https://github.com/SocialiteProviders/Manager/issues",
|
||||
"source": "https://github.com/SocialiteProviders/Manager/tree/4.0.1"
|
||||
},
|
||||
"install-path": "../socialiteproviders/manager"
|
||||
},
|
||||
{
|
||||
"name": "spatie/laravel-rate-limited-job-middleware",
|
||||
"version": "1.5.0",
|
||||
|
||||
13
vendor/composer/installed.php
vendored
13
vendor/composer/installed.php
vendored
@@ -6,7 +6,7 @@
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '0a11a5d23d14c0dbc4537b5219a99b5ffa1a03fd',
|
||||
'reference' => '4b72a59e62d368371546246a68aef55ee21c2705',
|
||||
'name' => 'laravel/laravel',
|
||||
),
|
||||
'versions' =>
|
||||
@@ -440,7 +440,7 @@
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '0a11a5d23d14c0dbc4537b5219a99b5ffa1a03fd',
|
||||
'reference' => '4b72a59e62d368371546246a68aef55ee21c2705',
|
||||
),
|
||||
'laravel/socialite' =>
|
||||
array (
|
||||
@@ -905,6 +905,15 @@
|
||||
),
|
||||
'reference' => '99732be0ddb3361e16ad77b68ba41efc8e979019',
|
||||
),
|
||||
'socialiteproviders/manager' =>
|
||||
array (
|
||||
'pretty_version' => '4.0.1',
|
||||
'version' => '4.0.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '0f5e82af0404df0080bdc5c105cef936c1711524',
|
||||
),
|
||||
'spatie/laravel-rate-limited-job-middleware' =>
|
||||
array (
|
||||
'pretty_version' => '1.5.0',
|
||||
|
||||
15
vendor/socialiteproviders/manager/.editorconfig
vendored
Normal file
15
vendor/socialiteproviders/manager/.editorconfig
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
; This file is for unifying the coding style for different editors and IDEs.
|
||||
; More information at http://editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
9
vendor/socialiteproviders/manager/.github/ISSUE_TEMPLATE.md
vendored
Normal file
9
vendor/socialiteproviders/manager/.github/ISSUE_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# Issue / Motivation:
|
||||
|
||||
## Expected behavior:
|
||||
|
||||
## Actual behavior:
|
||||
|
||||
## Steps to reproduce the behavior:
|
||||
|
||||
## Proposed solution:
|
||||
6
vendor/socialiteproviders/manager/.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
6
vendor/socialiteproviders/manager/.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
Fixes #
|
||||
|
||||
## Changes proposed in this pull request:
|
||||
-
|
||||
-
|
||||
-
|
||||
22
vendor/socialiteproviders/manager/LICENSE
vendored
Normal file
22
vendor/socialiteproviders/manager/LICENSE
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Andy Wendt
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
52
vendor/socialiteproviders/manager/composer.json
vendored
Normal file
52
vendor/socialiteproviders/manager/composer.json
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"name": "socialiteproviders/manager",
|
||||
"description": "Easily add new or override built-in providers in Laravel Socialite.",
|
||||
"homepage": "https://socialiteproviders.com/",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Andy Wendt",
|
||||
"email": "andy@awendt.com"
|
||||
},
|
||||
{
|
||||
"name": "Anton Komarev",
|
||||
"email": "a.komarev@cybercog.su"
|
||||
},
|
||||
{
|
||||
"name": "Miguel Piedrafita",
|
||||
"email": "soy@miguelpiedrafita.com"
|
||||
},
|
||||
{
|
||||
"name": "atymic",
|
||||
"email": "atymicq@gmail.com",
|
||||
"homepage": "https://atymic.dev"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.2 || ^8.0",
|
||||
"laravel/socialite": "~4.0|~5.0",
|
||||
"illuminate/support": "^6.0|^7.0|^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.0",
|
||||
"mockery/mockery": "^1.2"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"SocialiteProviders\\Manager\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"SocialiteProviders\\Manager\\Test\\": "tests/"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"SocialiteProviders\\Manager\\ServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"minimum-stability": "stable"
|
||||
}
|
||||
52
vendor/socialiteproviders/manager/src/Config.php
vendored
Normal file
52
vendor/socialiteproviders/manager/src/Config.php
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace SocialiteProviders\Manager;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
|
||||
class Config implements Contracts\ConfigInterface
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* Config constructor.
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $secret
|
||||
* @param string $callbackUri
|
||||
* @param array $additionalProviderConfig
|
||||
*/
|
||||
public function __construct($key, $secret, $callbackUri, array $additionalProviderConfig = [])
|
||||
{
|
||||
$this->config = array_merge([
|
||||
'client_id' => $key,
|
||||
'client_secret' => $secret,
|
||||
'redirect' => $this->formatRedirectUri($callbackUri),
|
||||
], $additionalProviderConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* Format the callback URI, resolving a relative URI if needed.
|
||||
*
|
||||
* @param string $callbackUri
|
||||
* @return string
|
||||
*/
|
||||
protected function formatRedirectUri($callbackUri)
|
||||
{
|
||||
return Str::startsWith($callbackUri, '/')
|
||||
? URL::to($callbackUri)
|
||||
: $callbackUri;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
return $this->config;
|
||||
}
|
||||
}
|
||||
54
vendor/socialiteproviders/manager/src/ConfigTrait.php
vendored
Normal file
54
vendor/socialiteproviders/manager/src/ConfigTrait.php
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace SocialiteProviders\Manager;
|
||||
|
||||
use Illuminate\Support\Arr;
|
||||
use SocialiteProviders\Manager\Contracts\ConfigInterface;
|
||||
|
||||
trait ConfigTrait
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* @param \SocialiteProviders\Manager\Contracts\OAuth1\ProviderInterface|\SocialiteProviders\Manager\Contracts\OAuth2\ProviderInterface $config
|
||||
*/
|
||||
public function setConfig(ConfigInterface $config)
|
||||
{
|
||||
$config = $config->get();
|
||||
|
||||
$this->config = $config;
|
||||
$this->clientId = $config['client_id'];
|
||||
$this->clientSecret = $config['client_secret'];
|
||||
$this->redirectUrl = $config['redirect'];
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function additionalConfigKeys()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @param mixed $default
|
||||
*
|
||||
* @return mixed|array
|
||||
*/
|
||||
protected function getConfig($key = null, $default = null)
|
||||
{
|
||||
// check manually if a key is given and if it exists in the config
|
||||
// this has to be done to check for spoofed additional config keys so that null isn't returned
|
||||
if (!empty($key) && empty($this->config[$key])) {
|
||||
return $default;
|
||||
}
|
||||
|
||||
return $key ? Arr::get($this->config, $key, $default) : $this->config;
|
||||
}
|
||||
}
|
||||
11
vendor/socialiteproviders/manager/src/Contracts/ConfigInterface.php
vendored
Normal file
11
vendor/socialiteproviders/manager/src/Contracts/ConfigInterface.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace SocialiteProviders\Manager\Contracts;
|
||||
|
||||
interface ConfigInterface
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function get();
|
||||
}
|
||||
16
vendor/socialiteproviders/manager/src/Contracts/Helpers/ConfigRetrieverInterface.php
vendored
Normal file
16
vendor/socialiteproviders/manager/src/Contracts/Helpers/ConfigRetrieverInterface.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace SocialiteProviders\Manager\Contracts\Helpers;
|
||||
|
||||
interface ConfigRetrieverInterface
|
||||
{
|
||||
/**
|
||||
* @param string $providerName
|
||||
* @param array $additionalConfigKeys
|
||||
*
|
||||
* @return \SocialiteProviders\Manager\Contracts\ConfigInterface
|
||||
*
|
||||
* @throws \SocialiteProviders\Manager\Exception\MissingConfigException
|
||||
*/
|
||||
public function fromServices($providerName, array $additionalConfigKeys = []);
|
||||
}
|
||||
15
vendor/socialiteproviders/manager/src/Contracts/OAuth1/ProviderInterface.php
vendored
Normal file
15
vendor/socialiteproviders/manager/src/Contracts/OAuth1/ProviderInterface.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace SocialiteProviders\Manager\Contracts\OAuth1;
|
||||
|
||||
use SocialiteProviders\Manager\Contracts\ConfigInterface as Config;
|
||||
|
||||
interface ProviderInterface
|
||||
{
|
||||
/**
|
||||
* @param \SocialiteProviders\Manager\Contracts\ConfigInterface $config
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setConfig(Config $config);
|
||||
}
|
||||
16
vendor/socialiteproviders/manager/src/Contracts/OAuth2/ProviderInterface.php
vendored
Normal file
16
vendor/socialiteproviders/manager/src/Contracts/OAuth2/ProviderInterface.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace SocialiteProviders\Manager\Contracts\OAuth2;
|
||||
|
||||
use Laravel\Socialite\Two\ProviderInterface as SocialiteOauth2ProviderInterface;
|
||||
use SocialiteProviders\Manager\Contracts\ConfigInterface as Config;
|
||||
|
||||
interface ProviderInterface extends SocialiteOauth2ProviderInterface
|
||||
{
|
||||
/**
|
||||
* @param \SocialiteProviders\Manager\Contracts\ConfigInterface $config
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setConfig(Config $config);
|
||||
}
|
||||
9
vendor/socialiteproviders/manager/src/Exception/InvalidArgumentException.php
vendored
Normal file
9
vendor/socialiteproviders/manager/src/Exception/InvalidArgumentException.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace SocialiteProviders\Manager\Exception;
|
||||
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
|
||||
class InvalidArgumentException extends BaseInvalidArgumentException
|
||||
{
|
||||
}
|
||||
9
vendor/socialiteproviders/manager/src/Exception/MissingConfigException.php
vendored
Normal file
9
vendor/socialiteproviders/manager/src/Exception/MissingConfigException.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace SocialiteProviders\Manager\Exception;
|
||||
|
||||
use Exception;
|
||||
|
||||
class MissingConfigException extends Exception
|
||||
{
|
||||
}
|
||||
145
vendor/socialiteproviders/manager/src/Helpers/ConfigRetriever.php
vendored
Normal file
145
vendor/socialiteproviders/manager/src/Helpers/ConfigRetriever.php
vendored
Normal file
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
|
||||
namespace SocialiteProviders\Manager\Helpers;
|
||||
|
||||
use Closure;
|
||||
use SocialiteProviders\Manager\Config;
|
||||
use SocialiteProviders\Manager\Contracts\Helpers\ConfigRetrieverInterface;
|
||||
use SocialiteProviders\Manager\Exception\MissingConfigException;
|
||||
|
||||
class ConfigRetriever implements ConfigRetrieverInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $providerName;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $providerIdentifier;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $servicesArray;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $additionalConfigKeys;
|
||||
|
||||
/**
|
||||
* @param string $providerName
|
||||
* @param array $additionalConfigKeys
|
||||
*
|
||||
* @return \SocialiteProviders\Manager\Contracts\ConfigInterface
|
||||
*
|
||||
* @throws \SocialiteProviders\Manager\Exception\MissingConfigException
|
||||
*/
|
||||
public function fromServices($providerName, array $additionalConfigKeys = [])
|
||||
{
|
||||
$this->providerName = $providerName;
|
||||
$this->getConfigFromServicesArray($providerName);
|
||||
|
||||
$this->additionalConfigKeys = $additionalConfigKeys = array_unique($additionalConfigKeys + ['guzzle']);
|
||||
|
||||
return new Config(
|
||||
$this->getFromServices('client_id'),
|
||||
$this->getFromServices('client_secret'),
|
||||
$this->getFromServices('redirect'),
|
||||
$this->getConfigItems($additionalConfigKeys, function ($key) {
|
||||
return $this->getFromServices(strtolower($key));
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $configKeys
|
||||
* @param \Closure $keyRetrievalClosure
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getConfigItems(array $configKeys, Closure $keyRetrievalClosure)
|
||||
{
|
||||
return $this->retrieveItemsFromConfig($configKeys, $keyRetrievalClosure);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $keys
|
||||
* @param \Closure $keyRetrievalClosure
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function retrieveItemsFromConfig(array $keys, Closure $keyRetrievalClosure)
|
||||
{
|
||||
$out = [];
|
||||
|
||||
foreach ($keys as $key) {
|
||||
$out[$key] = $keyRetrievalClosure($key);
|
||||
}
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @throws \SocialiteProviders\Manager\Exception\MissingConfigException
|
||||
*/
|
||||
protected function getFromServices($key)
|
||||
{
|
||||
$keyExists = array_key_exists($key, $this->servicesArray);
|
||||
|
||||
// ADDITIONAL value is empty
|
||||
if (!$keyExists && $this->isAdditionalConfig($key)) {
|
||||
return $key == 'guzzle' ? [] : null ;
|
||||
}
|
||||
|
||||
// REQUIRED value is empty
|
||||
if (!$keyExists) {
|
||||
throw new MissingConfigException("Missing services entry for {$this->providerName}.$key");
|
||||
}
|
||||
|
||||
return $this->servicesArray[$key];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $providerName
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws \SocialiteProviders\Manager\Exception\MissingConfigException
|
||||
*/
|
||||
protected function getConfigFromServicesArray($providerName)
|
||||
{
|
||||
$configArray = config("services.{$providerName}");
|
||||
|
||||
if (empty($configArray)) {
|
||||
// If we are running in console we should spoof values to make Socialite happy...
|
||||
if (app()->runningInConsole()) {
|
||||
$configArray = [
|
||||
'client_id' => "{$this->providerIdentifier}_KEY",
|
||||
'client_secret' => "{$this->providerIdentifier}_SECRET",
|
||||
'redirect' => "{$this->providerIdentifier}_REDIRECT_URI",
|
||||
];
|
||||
} else {
|
||||
throw new MissingConfigException("There is no services entry for $providerName");
|
||||
}
|
||||
}
|
||||
|
||||
return $this->servicesArray = $configArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function isAdditionalConfig($key)
|
||||
{
|
||||
return in_array(strtolower($key), $this->additionalConfigKeys, true);
|
||||
}
|
||||
}
|
||||
196
vendor/socialiteproviders/manager/src/OAuth1/AbstractProvider.php
vendored
Normal file
196
vendor/socialiteproviders/manager/src/OAuth1/AbstractProvider.php
vendored
Normal file
@@ -0,0 +1,196 @@
|
||||
<?php
|
||||
|
||||
namespace SocialiteProviders\Manager\OAuth1;
|
||||
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use InvalidArgumentException;
|
||||
use Laravel\Socialite\One\AbstractProvider as BaseProvider;
|
||||
use League\OAuth1\Client\Credentials\CredentialsException;
|
||||
use League\OAuth1\Client\Credentials\TokenCredentials;
|
||||
use SocialiteProviders\Manager\ConfigTrait;
|
||||
use SocialiteProviders\Manager\Contracts\ConfigInterface as Config;
|
||||
use SocialiteProviders\Manager\Contracts\OAuth1\ProviderInterface;
|
||||
use SocialiteProviders\Manager\SocialiteWasCalled;
|
||||
|
||||
abstract class AbstractProvider extends BaseProvider implements ProviderInterface
|
||||
{
|
||||
use ConfigTrait;
|
||||
|
||||
/**
|
||||
* Indicates if the session state should be utilized.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $stateless = true;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $credentialsResponseBody;
|
||||
|
||||
/**
|
||||
* @param string $providerName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function serviceContainerKey($providerName)
|
||||
{
|
||||
return SocialiteWasCalled::SERVICE_CONTAINER_PREFIX.$providerName;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @throws \League\OAuth1\Client\Credentials\CredentialsException
|
||||
*/
|
||||
public function user()
|
||||
{
|
||||
if (!$this->hasNecessaryVerifier()) {
|
||||
throw new InvalidArgumentException('Invalid request. Missing OAuth verifier.');
|
||||
}
|
||||
|
||||
$token = $this->getToken();
|
||||
$tokenCredentials = $token['tokenCredentials'];
|
||||
|
||||
$user = $this->mapUserToObject((array) $this->server->getUserDetails($tokenCredentials));
|
||||
|
||||
$user->setToken($tokenCredentials->getIdentifier(), $tokenCredentials->getSecret());
|
||||
|
||||
if ($user instanceof User) {
|
||||
parse_str($token['credentialsResponseBody'], $credentialsResponseBody);
|
||||
|
||||
if (!$credentialsResponseBody || !is_array($credentialsResponseBody)) {
|
||||
throw new CredentialsException('Unable to parse token credentials response.');
|
||||
}
|
||||
|
||||
$user->setAccessTokenResponseBody($credentialsResponseBody);
|
||||
}
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function userFromTokenAndSecret($token, $secret)
|
||||
{
|
||||
$tokenCredentials = new TokenCredentials();
|
||||
|
||||
$tokenCredentials->setIdentifier($token);
|
||||
$tokenCredentials->setSecret($secret);
|
||||
|
||||
$user = $this->mapUserToObject((array) $this->server->getUserDetails($tokenCredentials));
|
||||
|
||||
$user->setToken($tokenCredentials->getIdentifier(), $tokenCredentials->getSecret());
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirect the user to the authentication page for the provider.
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function redirect()
|
||||
{
|
||||
if (!$this->isStateless()) {
|
||||
$this->request->getSession()->put(
|
||||
'oauth.temp', $temp = $this->server->getTemporaryCredentials()
|
||||
);
|
||||
} else {
|
||||
$temp = $this->server->getTemporaryCredentials();
|
||||
$this->request->session()->put('oauth_temp', serialize($temp));
|
||||
}
|
||||
|
||||
return new RedirectResponse($this->server->getAuthorizationUrl($temp));
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates that the provider should operate as stateless.
|
||||
*
|
||||
* @param mixed $stateless
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function stateless($stateless = true)
|
||||
{
|
||||
$this->stateless = $stateless;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the scopes of the requested access.
|
||||
*
|
||||
* @param array $scopes
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function scopes(array $scopes)
|
||||
{
|
||||
$this->server = $this->server->scopes($scopes);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the custom parameters of the request.
|
||||
*
|
||||
* @param array $parameters
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function with(array $parameters)
|
||||
{
|
||||
$this->server = $this->server->with($parameters);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Config $config
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setConfig(Config $config)
|
||||
{
|
||||
$this->config = $this->server->setConfig($config);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the token credentials for the request.
|
||||
*
|
||||
* @return \League\OAuth1\Client\Credentials\TokenCredentials
|
||||
*/
|
||||
protected function getToken()
|
||||
{
|
||||
if (!$this->isStateless()) {
|
||||
$temp = $this->request->getSession()->get('oauth.temp');
|
||||
|
||||
return $this->server->getTokenCredentials(
|
||||
$temp, $this->request->get('oauth_token'), $this->request->get('oauth_verifier')
|
||||
);
|
||||
}
|
||||
$temp = unserialize($this->request->session()->get('oauth_temp'));
|
||||
|
||||
return $this->server->getTokenCredentials(
|
||||
$temp, $this->request->get('oauth_token'), $this->request->get('oauth_verifier')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the provider is operating as stateless.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function isStateless()
|
||||
{
|
||||
if (defined('SOCIALITEPROVIDERS_STATELESS')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->stateless;
|
||||
}
|
||||
}
|
||||
123
vendor/socialiteproviders/manager/src/OAuth1/Server.php
vendored
Normal file
123
vendor/socialiteproviders/manager/src/OAuth1/Server.php
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
namespace SocialiteProviders\Manager\OAuth1;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\BadResponseException;
|
||||
use InvalidArgumentException;
|
||||
use League\OAuth1\Client\Credentials\TemporaryCredentials;
|
||||
use League\OAuth1\Client\Server\Server as BaseServer;
|
||||
use SocialiteProviders\Manager\ConfigTrait;
|
||||
|
||||
abstract class Server extends BaseServer
|
||||
{
|
||||
use ConfigTrait;
|
||||
|
||||
/**
|
||||
* The custom parameters to be sent with the request.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $parameters = [];
|
||||
|
||||
/**
|
||||
* The scopes being requested.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $scopes = [];
|
||||
|
||||
/**
|
||||
* The separating character for the requested scopes.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $scopeSeparator = ',';
|
||||
|
||||
/**
|
||||
* Retrieves token credentials by passing in the temporary credentials,
|
||||
* the temporary credentials identifier as passed back by the server
|
||||
* and finally the verifier code.
|
||||
*
|
||||
* @param \League\OAuth1\Client\Credentials\TemporaryCredentials $temporaryCredentials
|
||||
* @param string $temporaryIdentifier
|
||||
* @param string $verifier
|
||||
*
|
||||
* @return \League\OAuth1\Client\Credentials\TokenCredentials
|
||||
*/
|
||||
public function getTokenCredentials(TemporaryCredentials $temporaryCredentials, $temporaryIdentifier, $verifier)
|
||||
{
|
||||
if ($temporaryIdentifier !== $temporaryCredentials->getIdentifier()) {
|
||||
throw new InvalidArgumentException(
|
||||
'Temporary identifier passed back by server does not match that of stored temporary credentials.
|
||||
Potential man-in-the-middle.'
|
||||
);
|
||||
}
|
||||
|
||||
$uri = $this->urlTokenCredentials();
|
||||
$bodyParameters = ['oauth_verifier' => $verifier];
|
||||
|
||||
$client = $this->createHttpClient();
|
||||
|
||||
$headers = $this->getHeaders($temporaryCredentials, 'POST', $uri, $bodyParameters);
|
||||
|
||||
try {
|
||||
if ($client instanceof Client) {
|
||||
$response = $client->post($uri, [
|
||||
'headers' => $headers,
|
||||
'form_params' => $bodyParameters,
|
||||
]);
|
||||
} else {
|
||||
$response = $client->post($uri, $headers, $bodyParameters)->send();
|
||||
}
|
||||
} catch (BadResponseException $e) {
|
||||
return $this->handleTokenCredentialsBadResponse($e);
|
||||
}
|
||||
|
||||
return [
|
||||
'tokenCredentials' => $this->createTokenCredentials($response->getBody()),
|
||||
'credentialsResponseBody' => $response->getBody(),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the scopes of the requested access.
|
||||
*
|
||||
* @param array $scopes
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function scopes(array $scopes)
|
||||
{
|
||||
$this->scopes = array_unique(array_merge($this->scopes, $scopes));
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the custom parameters of the request.
|
||||
*
|
||||
* @param array $parameters
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function with(array $parameters)
|
||||
{
|
||||
$this->parameters = $parameters;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format the given scopes.
|
||||
*
|
||||
* @param array $scopes
|
||||
* @param string $scopeSeparator
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function formatScopes(array $scopes, $scopeSeparator)
|
||||
{
|
||||
return implode($scopeSeparator, $scopes);
|
||||
}
|
||||
}
|
||||
33
vendor/socialiteproviders/manager/src/OAuth1/User.php
vendored
Normal file
33
vendor/socialiteproviders/manager/src/OAuth1/User.php
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace SocialiteProviders\Manager\OAuth1;
|
||||
|
||||
use Laravel\Socialite\One\User as BaseUser;
|
||||
|
||||
class User extends BaseUser
|
||||
{
|
||||
/**
|
||||
* The User Credentials.
|
||||
*
|
||||
* e.g. access_token, refresh_token, etc.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $accessTokenResponseBody;
|
||||
|
||||
/**
|
||||
* Set the credentials on the user.
|
||||
*
|
||||
* Might include things such as the token and refresh token
|
||||
*
|
||||
* @param array $accessTokenResponseBody
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAccessTokenResponseBody(array $accessTokenResponseBody)
|
||||
{
|
||||
$this->accessTokenResponseBody = $accessTokenResponseBody;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
91
vendor/socialiteproviders/manager/src/OAuth2/AbstractProvider.php
vendored
Normal file
91
vendor/socialiteproviders/manager/src/OAuth2/AbstractProvider.php
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
|
||||
namespace SocialiteProviders\Manager\OAuth2;
|
||||
|
||||
use Illuminate\Support\Arr;
|
||||
use Laravel\Socialite\Two\AbstractProvider as BaseProvider;
|
||||
use Laravel\Socialite\Two\InvalidStateException;
|
||||
use SocialiteProviders\Manager\ConfigTrait;
|
||||
use SocialiteProviders\Manager\Contracts\OAuth2\ProviderInterface;
|
||||
use SocialiteProviders\Manager\SocialiteWasCalled;
|
||||
|
||||
abstract class AbstractProvider extends BaseProvider implements ProviderInterface
|
||||
{
|
||||
use ConfigTrait;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $credentialsResponseBody;
|
||||
|
||||
/**
|
||||
* @param string $providerName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function serviceContainerKey($providerName)
|
||||
{
|
||||
return SocialiteWasCalled::SERVICE_CONTAINER_PREFIX.$providerName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \SocialiteProviders\Manager\OAuth2\User
|
||||
*/
|
||||
public function user()
|
||||
{
|
||||
if ($this->hasInvalidState()) {
|
||||
throw new InvalidStateException();
|
||||
}
|
||||
|
||||
$response = $this->getAccessTokenResponse($this->getCode());
|
||||
$this->credentialsResponseBody = $response;
|
||||
|
||||
$user = $this->mapUserToObject($this->getUserByToken(
|
||||
$token = $this->parseAccessToken($response)
|
||||
));
|
||||
|
||||
if ($user instanceof User) {
|
||||
$user->setAccessTokenResponseBody($this->credentialsResponseBody);
|
||||
}
|
||||
|
||||
return $user->setToken($token)
|
||||
->setRefreshToken($this->parseRefreshToken($response))
|
||||
->setExpiresIn($this->parseExpiresIn($response));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the access token from the token response body.
|
||||
*
|
||||
* @param array $body
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function parseAccessToken($body)
|
||||
{
|
||||
return Arr::get($body, 'access_token');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the refresh token from the token response body.
|
||||
*
|
||||
* @param array $body
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function parseRefreshToken($body)
|
||||
{
|
||||
return Arr::get($body, 'refresh_token');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the expires in from the token response body.
|
||||
*
|
||||
* @param array $body
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function parseExpiresIn($body)
|
||||
{
|
||||
return Arr::get($body, 'expires_in');
|
||||
}
|
||||
}
|
||||
33
vendor/socialiteproviders/manager/src/OAuth2/User.php
vendored
Normal file
33
vendor/socialiteproviders/manager/src/OAuth2/User.php
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace SocialiteProviders\Manager\OAuth2;
|
||||
|
||||
use Laravel\Socialite\Two\User as BaseUser;
|
||||
|
||||
class User extends BaseUser
|
||||
{
|
||||
/**
|
||||
* The User Credentials.
|
||||
*
|
||||
* e.g. access_token, refresh_token, etc.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $accessTokenResponseBody;
|
||||
|
||||
/**
|
||||
* Set the credentials on the user.
|
||||
*
|
||||
* Might include things such as the token and refresh token
|
||||
*
|
||||
* @param array $accessTokenResponseBody
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAccessTokenResponseBody(array $accessTokenResponseBody)
|
||||
{
|
||||
$this->accessTokenResponseBody = $accessTokenResponseBody;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
48
vendor/socialiteproviders/manager/src/ServiceProvider.php
vendored
Normal file
48
vendor/socialiteproviders/manager/src/ServiceProvider.php
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace SocialiteProviders\Manager;
|
||||
|
||||
use Laravel\Socialite\SocialiteServiceProvider;
|
||||
use SocialiteProviders\Manager\Contracts\Helpers\ConfigRetrieverInterface;
|
||||
use SocialiteProviders\Manager\Helpers\ConfigRetriever;
|
||||
|
||||
class ServiceProvider extends SocialiteServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap the provider services.
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
if ($this->app instanceof \Illuminate\Foundation\Application) {
|
||||
// Laravel
|
||||
$this->app->booted(function () {
|
||||
$socialiteWasCalled = app(SocialiteWasCalled::class);
|
||||
|
||||
event($socialiteWasCalled);
|
||||
});
|
||||
} else {
|
||||
// Lumen
|
||||
$socialiteWasCalled = app(SocialiteWasCalled::class);
|
||||
|
||||
event($socialiteWasCalled);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the provider services.
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
parent::register();
|
||||
|
||||
if (class_exists('Laravel\Lumen\Application') && !defined('SOCIALITEPROVIDERS_STATELESS')) {
|
||||
define('SOCIALITEPROVIDERS_STATELESS', true);
|
||||
}
|
||||
|
||||
if (!$this->app->bound(ConfigRetrieverInterface::class)) {
|
||||
$this->app->singleton(ConfigRetrieverInterface::class, function () {
|
||||
return new ConfigRetriever();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
200
vendor/socialiteproviders/manager/src/SocialiteWasCalled.php
vendored
Normal file
200
vendor/socialiteproviders/manager/src/SocialiteWasCalled.php
vendored
Normal file
@@ -0,0 +1,200 @@
|
||||
<?php
|
||||
|
||||
namespace SocialiteProviders\Manager;
|
||||
|
||||
use Illuminate\Contracts\Container\Container as Application;
|
||||
use Laravel\Socialite\Contracts\Factory as SocialiteFactory;
|
||||
use Laravel\Socialite\One\AbstractProvider as SocialiteOAuth1AbstractProvider;
|
||||
use Laravel\Socialite\SocialiteManager;
|
||||
use Laravel\Socialite\Two\AbstractProvider as SocialiteOAuth2AbstractProvider;
|
||||
use League\OAuth1\Client\Server\Server as OAuth1Server;
|
||||
use SocialiteProviders\Manager\Contracts\Helpers\ConfigRetrieverInterface;
|
||||
use SocialiteProviders\Manager\Exception\InvalidArgumentException;
|
||||
|
||||
class SocialiteWasCalled
|
||||
{
|
||||
const SERVICE_CONTAINER_PREFIX = 'SocialiteProviders.config.';
|
||||
|
||||
/**
|
||||
* @var \Illuminate\Contracts\Container\Container
|
||||
*/
|
||||
protected $app;
|
||||
|
||||
/**
|
||||
* @var \SocialiteProviders\Manager\Contracts\Helpers\ConfigRetrieverInterface
|
||||
*/
|
||||
private $configRetriever;
|
||||
|
||||
/**
|
||||
* @param \Illuminate\Contracts\Container\Container $app
|
||||
* @param \SocialiteProviders\Manager\Contracts\Helpers\ConfigRetrieverInterface $configRetriever
|
||||
*/
|
||||
public function __construct(Application $app, ConfigRetrieverInterface $configRetriever)
|
||||
{
|
||||
$this->app = $app;
|
||||
$this->configRetriever = $configRetriever;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $providerName 'meetup'
|
||||
* @param string $providerClass 'Your\Name\Space\ClassNameProvider' must extend
|
||||
* either Laravel\Socialite\Two\AbstractProvider or
|
||||
* Laravel\Socialite\One\AbstractProvider
|
||||
* @param string $oauth1Server 'Your\Name\Space\ClassNameServer' must extend League\OAuth1\Client\Server\Server
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \SocialiteProviders\Manager\Exception\InvalidArgumentException
|
||||
*/
|
||||
public function extendSocialite($providerName, $providerClass, $oauth1Server = null)
|
||||
{
|
||||
/** @var SocialiteManager $socialite */
|
||||
$socialite = $this->app->make(SocialiteFactory::class);
|
||||
|
||||
$this->classExists($providerClass);
|
||||
if ($this->isOAuth1($oauth1Server)) {
|
||||
$this->classExists($oauth1Server);
|
||||
$this->classExtends($providerClass, SocialiteOAuth1AbstractProvider::class);
|
||||
}
|
||||
|
||||
$socialite->extend(
|
||||
$providerName,
|
||||
function () use ($socialite, $providerName, $providerClass, $oauth1Server) {
|
||||
$provider = $this->buildProvider($socialite, $providerName, $providerClass, $oauth1Server);
|
||||
if (defined('SOCIALITEPROVIDERS_STATELESS') && SOCIALITEPROVIDERS_STATELESS) {
|
||||
return $provider->stateless();
|
||||
}
|
||||
|
||||
return $provider;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Laravel\Socialite\SocialiteManager $socialite
|
||||
* @param string $providerName
|
||||
* @param string $providerClass
|
||||
* @param null|string $oauth1Server
|
||||
*
|
||||
* @return \Laravel\Socialite\One\AbstractProvider|\Laravel\Socialite\Two\AbstractProvider
|
||||
*
|
||||
* @throws \SocialiteProviders\Manager\Exception\MissingConfigException
|
||||
*/
|
||||
protected function buildProvider(SocialiteManager $socialite, $providerName, $providerClass, $oauth1Server)
|
||||
{
|
||||
if ($this->isOAuth1($oauth1Server)) {
|
||||
return $this->buildOAuth1Provider($socialite, $providerClass, $providerName, $oauth1Server);
|
||||
}
|
||||
|
||||
return $this->buildOAuth2Provider($socialite, $providerClass, $providerName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an OAuth 1 provider instance.
|
||||
*
|
||||
* @param \Laravel\Socialite\SocialiteManager $socialite
|
||||
* @param string $providerClass must extend Laravel\Socialite\One\AbstractProvider
|
||||
* @param string $providerName
|
||||
* @param string $oauth1Server must extend League\OAuth1\Client\Server\Server
|
||||
*
|
||||
* @return \Laravel\Socialite\One\AbstractProvider
|
||||
*
|
||||
* @throws \SocialiteProviders\Manager\Exception\MissingConfigException
|
||||
*/
|
||||
protected function buildOAuth1Provider(SocialiteManager $socialite, $providerClass, $providerName, $oauth1Server)
|
||||
{
|
||||
$this->classExtends($oauth1Server, OAuth1Server::class);
|
||||
|
||||
$config = $this->getConfig($providerClass, $providerName);
|
||||
|
||||
$configServer = $socialite->formatConfig($config->get());
|
||||
|
||||
$provider = new $providerClass(
|
||||
$this->app->offsetGet('request'), new $oauth1Server($configServer)
|
||||
);
|
||||
|
||||
$provider->setConfig($config);
|
||||
|
||||
return $provider;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an OAuth 2 provider instance.
|
||||
*
|
||||
* @param SocialiteManager $socialite
|
||||
* @param string $providerClass must extend Laravel\Socialite\Two\AbstractProvider
|
||||
* @param string $providerName
|
||||
*
|
||||
* @return \Laravel\Socialite\Two\AbstractProvider
|
||||
*
|
||||
* @throws \SocialiteProviders\Manager\Exception\MissingConfigException
|
||||
*/
|
||||
protected function buildOAuth2Provider(SocialiteManager $socialite, $providerClass, $providerName)
|
||||
{
|
||||
$this->classExtends($providerClass, SocialiteOAuth2AbstractProvider::class);
|
||||
|
||||
$config = $this->getConfig($providerClass, $providerName);
|
||||
|
||||
$provider = $socialite->buildProvider($providerClass, $config->get());
|
||||
|
||||
$provider->setConfig($config);
|
||||
|
||||
return $provider;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $providerClass
|
||||
* @param string $providerName
|
||||
*
|
||||
* @return \SocialiteProviders\Manager\Contracts\ConfigInterface
|
||||
*
|
||||
* @throws \SocialiteProviders\Manager\Exception\MissingConfigException
|
||||
*/
|
||||
protected function getConfig(string $providerClass, string $providerName)
|
||||
{
|
||||
return $this->configRetriever->fromServices(
|
||||
$providerName, $providerClass::additionalConfigKeys()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a server is given, which indicates that OAuth1 is used.
|
||||
*
|
||||
* @param string $oauth1Server
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function isOAuth1($oauth1Server)
|
||||
{
|
||||
return !empty($oauth1Server);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $class
|
||||
* @param string $baseClass
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \SocialiteProviders\Manager\Exception\InvalidArgumentException
|
||||
*/
|
||||
private function classExtends($class, $baseClass)
|
||||
{
|
||||
if (false === is_subclass_of($class, $baseClass)) {
|
||||
throw new InvalidArgumentException("{$class} does not extend {$baseClass}");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $providerClass
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \SocialiteProviders\Manager\Exception\InvalidArgumentException
|
||||
*/
|
||||
private function classExists($providerClass)
|
||||
{
|
||||
if (!class_exists($providerClass)) {
|
||||
throw new InvalidArgumentException("{$providerClass} doesn't exist");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user