From: Dan Brown Date: Sun, 11 Feb 2018 11:44:09 +0000 (+0000) Subject: Merge branch 'master' of git://github.com/moutonnoireu/BookStack into moutonnoireu... X-Git-Tag: v0.20.0~1^2~4 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/110f32a16dc23a9f14d9c185d60fbcb921732b85 Merge branch 'master' of git://github.com/moutonnoireu/BookStack into moutonnoireu-master Also updated composer deps --- 110f32a16dc23a9f14d9c185d60fbcb921732b85 diff --cc .env.example index 110b36500,d06ef675b..86f99f30f --- a/.env.example +++ b/.env.example @@@ -47,12 -47,10 +47,13 @@@ GITHUB_APP_SECRET=fals GOOGLE_APP_ID=false GOOGLE_APP_SECRET=false OKTA_BASE_URL=false -OKTA_KEY=false -OKTA_SECRET=false +OKTA_APP_ID=false +OKTA_APP_SECRET=false - + TWITCH_APP_ID=false + TWITCH_APP_SECRET=false +GITLAB_APP_ID=false +GITLAB_APP_SECRET=false +GITLAB_BASE_URI=false # External services such as Gravatar DISABLE_EXTERNAL_SERVICES=false diff --cc app/Providers/EventServiceProvider.php index dec7b98c6,5a690069c..cc3e4d993 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@@ -18,7 -18,7 +18,8 @@@ class EventServiceProvider extends Serv 'SocialiteProviders\Slack\SlackExtendSocialite@handle', 'SocialiteProviders\Azure\AzureExtendSocialite@handle', 'SocialiteProviders\Okta\OktaExtendSocialite@handle', + 'SocialiteProviders\GitLab\GitLabExtendSocialite@handle', + 'SocialiteProviders\Twitch\TwitchExtendSocialite@handle', ], ]; diff --cc app/Services/SocialAuthService.php index c31e67d0d,6eb5202ae..02361e59b --- a/app/Services/SocialAuthService.php +++ b/app/Services/SocialAuthService.php @@@ -16,7 -16,7 +16,7 @@@ class SocialAuthServic protected $socialite; protected $socialAccount; - protected $validSocialDrivers = ['google', 'github', 'facebook', 'slack', 'twitter', 'azure', 'okta', 'gitlab']; - protected $validSocialDrivers = ['google', 'github', 'facebook', 'slack', 'twitter', 'azure', 'okta', 'twitch']; ++ protected $validSocialDrivers = ['google', 'github', 'facebook', 'slack', 'twitter', 'azure', 'okta', 'gitlab', 'twitch']; /** * SocialAuthService constructor. diff --cc composer.json index 10b3592c8,54eb3f26c..5106ed0bb --- a/composer.json +++ b/composer.json @@@ -19,7 -19,7 +19,8 @@@ "socialiteproviders/slack": "^3.0", "socialiteproviders/microsoft-azure": "^3.0", "socialiteproviders/okta": "^1.0", - "socialiteproviders/gitlab": "^3.0" ++ "socialiteproviders/gitlab": "^3.0", + "socialiteproviders/twitch": "^3.0" }, "require-dev": { "filp/whoops": "~2.0", diff --cc composer.lock index f36355797,bf9bc489f..9370bebff --- a/composer.lock +++ b/composer.lock @@@ -4,20 -4,20 +4,20 @@@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "210685bb4ecd91f015682f5cf03ba84d", - "content-hash": "96d5f23f0652b8093d7939e8c29bdf18", ++ "content-hash": "ed85d10e69b1071020178cb400a80e48", "packages": [ { "name": "aws/aws-sdk-php", - "version": "3.45.3", - "version": "3.52.2", ++ "version": "3.52.6", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "d0abb0b1194fa64973b135191f56df991bc5787c" - "reference": "69ba4e07288a532fe7635f7cdd73cffa6509f538" ++ "reference": "c9af7657eddc0267cc7ac4f969c10d5c18459992" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/d0abb0b1194fa64973b135191f56df991bc5787c", - "reference": "d0abb0b1194fa64973b135191f56df991bc5787c", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/69ba4e07288a532fe7635f7cdd73cffa6509f538", - "reference": "69ba4e07288a532fe7635f7cdd73cffa6509f538", ++ "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c9af7657eddc0267cc7ac4f969c10d5c18459992", ++ "reference": "c9af7657eddc0267cc7ac4f969c10d5c18459992", "shasum": "" }, "require": { @@@ -84,25 -84,25 +84,25 @@@ "s3", "sdk" ], - "time": "2017-12-08T21:36:50+00:00" - "time": "2018-01-26T22:17:57+00:00" ++ "time": "2018-02-09T22:53:37+00:00" }, { "name": "barryvdh/laravel-dompdf", -- "version": "v0.8.1", ++ "version": "v0.8.2", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-dompdf.git", -- "reference": "3b2235e589616331d68482d61b7763789a2600fe" ++ "reference": "7dcdecfa125c174d0abe723603633dc2756ea3af" }, "dist": { "type": "zip", -- "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/3b2235e589616331d68482d61b7763789a2600fe", -- "reference": "3b2235e589616331d68482d61b7763789a2600fe", ++ "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/7dcdecfa125c174d0abe723603633dc2756ea3af", ++ "reference": "7dcdecfa125c174d0abe723603633dc2756ea3af", "shasum": "" }, "require": { "dompdf/dompdf": "^0.8", -- "illuminate/support": "5.1.x|5.2.x|5.3.x|5.4.x|5.5.x", ++ "illuminate/support": "5.1.x|5.2.x|5.3.x|5.4.x|5.5.x|5.6.x", "php": ">=5.5.9" }, "type": "library", @@@ -140,32 -140,32 +140,32 @@@ "laravel", "pdf" ], -- "time": "2017-07-29T19:01:17+00:00" ++ "time": "2018-02-07T17:43:25+00:00" }, { "name": "barryvdh/laravel-snappy", -- "version": "v0.4.0", ++ "version": "v0.4.1", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-snappy.git", -- "reference": "f08c7e5b4ddea585bfcd48ab4f40f920e58dd1cf" ++ "reference": "5f6e7f3ba15c867d1b8e2885d454110270616ebe" }, "dist": { "type": "zip", -- "url": "https://api.github.com/repos/barryvdh/laravel-snappy/zipball/f08c7e5b4ddea585bfcd48ab4f40f920e58dd1cf", -- "reference": "f08c7e5b4ddea585bfcd48ab4f40f920e58dd1cf", ++ "url": "https://api.github.com/repos/barryvdh/laravel-snappy/zipball/5f6e7f3ba15c867d1b8e2885d454110270616ebe", ++ "reference": "5f6e7f3ba15c867d1b8e2885d454110270616ebe", "shasum": "" }, "require": { -- "illuminate/filesystem": "5.0.x|5.1.x|5.2.x|5.3.x|5.4.x|5.5.x", -- "illuminate/support": "5.0.x|5.1.x|5.2.x|5.3.x|5.4.x|5.5.x", -- "knplabs/knp-snappy": "*", ++ "illuminate/filesystem": "5.0.x|5.1.x|5.2.x|5.3.x|5.4.x|5.5.x|5.6.x", ++ "illuminate/support": "5.0.x|5.1.x|5.2.x|5.3.x|5.4.x|5.5.x|5.6.x", ++ "knplabs/knp-snappy": "^1", "php": ">=5.4.0" }, "type": "library", "extra": { "branch-alias": { -- "dev-master": "0.3-dev" ++ "dev-master": "0.4-dev" }, "laravel": { "providers": [ @@@ -201,7 -201,7 +201,7 @@@ "wkhtmltoimage", "wkhtmltopdf" ], -- "time": "2017-08-14T06:48:50+00:00" ++ "time": "2018-02-08T15:58:26+00:00" }, { "name": "cogpowered/finediff", @@@ -964,16 -964,16 +964,16 @@@ }, { "name": "laravel/framework", - "version": "v5.5.24", - "version": "v5.5.32", ++ "version": "v5.5.34", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "06135405bb1f736dac5e9529ed1541fc446c9c0f" - "reference": "254e4c3e133f5bc8d6068cdf28ea062abc10adf2" ++ "reference": "1de7c0aec13eadbdddc2d1ba4019b064b2c6b966" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/06135405bb1f736dac5e9529ed1541fc446c9c0f", - "reference": "06135405bb1f736dac5e9529ed1541fc446c9c0f", - "url": "https://api.github.com/repos/laravel/framework/zipball/254e4c3e133f5bc8d6068cdf28ea062abc10adf2", - "reference": "254e4c3e133f5bc8d6068cdf28ea062abc10adf2", ++ "url": "https://api.github.com/repos/laravel/framework/zipball/1de7c0aec13eadbdddc2d1ba4019b064b2c6b966", ++ "reference": "1de7c0aec13eadbdddc2d1ba4019b064b2c6b966", "shasum": "" }, "require": { @@@ -1093,7 -1094,7 +1094,7 @@@ "framework", "laravel" ], - "time": "2017-12-07T01:28:21+00:00" - "time": "2018-01-18T13:27:23+00:00" ++ "time": "2018-02-06T15:36:55+00:00" }, { "name": "laravel/socialite", @@@ -2075,46 -2075,9 +2075,46 @@@ ], "time": "2016-07-19T19:14:21+00:00" }, + { + "name": "socialiteproviders/gitlab", + "version": "v3.0.1", + "source": { + "type": "git", + "url": "https://github.com/SocialiteProviders/GitLab.git", + "reference": "c96dc004563a3caf157608fe9aa9e45c79065d00" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/SocialiteProviders/GitLab/zipball/c96dc004563a3caf157608fe9aa9e45c79065d00", + "reference": "c96dc004563a3caf157608fe9aa9e45c79065d00", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0", + "socialiteproviders/manager": "~3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "SocialiteProviders\\GitLab\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christoffer Martinsen", + "email": "christoffermartinsen@gmail.com" + } + ], + "description": "GitLab OAuth2 Provider for Laravel Socialite", + "time": "2017-01-31T05:06:13+00:00" + }, { "name": "socialiteproviders/manager", - "version": "v3.3.0", + "version": "v3.3.1", "source": { "type": "git", "url": "https://github.com/SocialiteProviders/Manager.git", @@@ -2758,16 -2758,16 +2795,16 @@@ }, { "name": "symfony/polyfill-mbstring", -- "version": "v1.6.0", ++ "version": "v1.7.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", -- "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296" ++ "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" }, "dist": { "type": "zip", -- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", -- "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", ++ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", ++ "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", "shasum": "" }, "require": { @@@ -2779,7 -2779,7 +2816,7 @@@ "type": "library", "extra": { "branch-alias": { -- "dev-master": "1.6-dev" ++ "dev-master": "1.7-dev" } }, "autoload": { @@@ -2813,7 -2813,7 +2850,7 @@@ "portable", "shim" ], -- "time": "2017-10-11T12:05:26+00:00" ++ "time": "2018-01-30T19:27:44+00:00" }, { "name": "symfony/process", @@@ -3176,26 -3176,26 +3213,26 @@@ "packages-dev": [ { "name": "barryvdh/laravel-debugbar", -- "version": "v3.1.0", ++ "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-debugbar.git", -- "reference": "01a859752094e00aa8548832312366753272f8af" ++ "reference": "f0018d359a2ad6968ad11b283283a925e017f3c9" }, "dist": { "type": "zip", -- "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/01a859752094e00aa8548832312366753272f8af", -- "reference": "01a859752094e00aa8548832312366753272f8af", ++ "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/f0018d359a2ad6968ad11b283283a925e017f3c9", ++ "reference": "f0018d359a2ad6968ad11b283283a925e017f3c9", "shasum": "" }, "require": { -- "illuminate/routing": "5.5.x", -- "illuminate/session": "5.5.x", -- "illuminate/support": "5.5.x", -- "maximebf/debugbar": "~1.14.0", ++ "illuminate/routing": "5.5.x|5.6.x", ++ "illuminate/session": "5.5.x|5.6.x", ++ "illuminate/support": "5.5.x|5.6.x", ++ "maximebf/debugbar": "~1.15.0", "php": ">=7.0", -- "symfony/debug": "^3", -- "symfony/finder": "^3" ++ "symfony/debug": "^3|^4", ++ "symfony/finder": "^3|^4" }, "require-dev": { "illuminate/framework": "5.5.x" @@@ -3203,7 -3203,7 +3240,7 @@@ "type": "library", "extra": { "branch-alias": { -- "dev-master": "3.0-dev" ++ "dev-master": "3.2-dev" }, "laravel": { "providers": [ @@@ -3240,34 -3240,34 +3277,34 @@@ "profiler", "webprofiler" ], -- "time": "2017-09-18T13:32:46+00:00" ++ "time": "2018-02-07T08:29:09+00:00" }, { "name": "barryvdh/laravel-ide-helper", -- "version": "v2.4.1", ++ "version": "v2.4.3", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-ide-helper.git", -- "reference": "2b1273c45e2f8df7a625563e2283a17c14f02ae8" ++ "reference": "5c304db44fba8e9c4aa0c09739e59f7be7736fdd" }, "dist": { "type": "zip", -- "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/2b1273c45e2f8df7a625563e2283a17c14f02ae8", -- "reference": "2b1273c45e2f8df7a625563e2283a17c14f02ae8", ++ "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/5c304db44fba8e9c4aa0c09739e59f7be7736fdd", ++ "reference": "5c304db44fba8e9c4aa0c09739e59f7be7736fdd", "shasum": "" }, "require": { "barryvdh/reflection-docblock": "^2.0.4", -- "illuminate/console": "^5.0,<5.6", -- "illuminate/filesystem": "^5.0,<5.6", -- "illuminate/support": "^5.0,<5.6", ++ "illuminate/console": "^5.0,<5.7", ++ "illuminate/filesystem": "^5.0,<5.7", ++ "illuminate/support": "^5.0,<5.7", "php": ">=5.4.0", "symfony/class-loader": "^2.3|^3.0" }, "require-dev": { "doctrine/dbal": "~2.3", -- "illuminate/config": "^5.0,<5.6", -- "illuminate/view": "^5.0,<5.6", ++ "illuminate/config": "^5.0,<5.7", ++ "illuminate/view": "^5.0,<5.7", "phpunit/phpunit": "4.*", "scrutinizer/ocular": "~1.1", "squizlabs/php_codesniffer": "~2.3" @@@ -3313,7 -3313,7 +3350,7 @@@ "phpstorm", "sublime" ], -- "time": "2017-07-16T00:24:12+00:00" ++ "time": "2018-02-08T07:56:07+00:00" }, { "name": "barryvdh/reflection-docblock", @@@ -3627,22 -3627,22 +3664,22 @@@ }, { "name": "maximebf/debugbar", -- "version": "v1.14.1", ++ "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/maximebf/php-debugbar.git", -- "reference": "64251a392344e3d22f3d21c3b7c531ba96eb01d2" ++ "reference": "30e7d60937ee5f1320975ca9bc7bcdd44d500f07" }, "dist": { "type": "zip", -- "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/64251a392344e3d22f3d21c3b7c531ba96eb01d2", -- "reference": "64251a392344e3d22f3d21c3b7c531ba96eb01d2", ++ "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/30e7d60937ee5f1320975ca9bc7bcdd44d500f07", ++ "reference": "30e7d60937ee5f1320975ca9bc7bcdd44d500f07", "shasum": "" }, "require": { "php": ">=5.3.0", "psr/log": "^1.0", -- "symfony/var-dumper": "^2.6|^3.0" ++ "symfony/var-dumper": "^2.6|^3.0|^4.0" }, "require-dev": { "phpunit/phpunit": "^4.0|^5.0" @@@ -3684,7 -3684,7 +3721,7 @@@ "debug", "debugbar" ], -- "time": "2017-09-13T12:19:36+00:00" ++ "time": "2017-12-15T11:13:46+00:00" }, { "name": "mockery/mockery", @@@ -4364,16 -4364,16 +4401,16 @@@ }, { "name": "phpunit/phpunit", - "version": "6.5.3", - "version": "6.5.5", ++ "version": "6.5.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "882e886cc928a0abd3c61282b2a64026237d14a4" - "reference": "83d27937a310f2984fd575686138597147bdc7df" ++ "reference": "3330ef26ade05359d006041316ed0fa9e8e3cefe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/882e886cc928a0abd3c61282b2a64026237d14a4", - "reference": "882e886cc928a0abd3c61282b2a64026237d14a4", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/83d27937a310f2984fd575686138597147bdc7df", - "reference": "83d27937a310f2984fd575686138597147bdc7df", ++ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3330ef26ade05359d006041316ed0fa9e8e3cefe", ++ "reference": "3330ef26ade05359d006041316ed0fa9e8e3cefe", "shasum": "" }, "require": { @@@ -4444,7 -4444,7 +4481,7 @@@ "testing", "xunit" ], - "time": "2017-12-06T09:42:03+00:00" - "time": "2017-12-17T06:31:19+00:00" ++ "time": "2018-02-01T05:57:37+00:00" }, { "name": "phpunit/phpunit-mock-objects", @@@ -4552,21 -4552,21 +4589,21 @@@ }, { "name": "sebastian/comparator", - "version": "2.1.0", - "version": "2.1.2", ++ "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1174d9018191e93cb9d719edec01257fc05f8158" - "reference": "11c07feade1d65453e06df3b3b90171d6d982087" ++ "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1174d9018191e93cb9d719edec01257fc05f8158", - "reference": "1174d9018191e93cb9d719edec01257fc05f8158", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/11c07feade1d65453e06df3b3b90171d6d982087", - "reference": "11c07feade1d65453e06df3b3b90171d6d982087", ++ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", ++ "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", "shasum": "" }, "require": { "php": "^7.0", -- "sebastian/diff": "^2.0", ++ "sebastian/diff": "^2.0 || ^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { @@@ -4612,7 -4612,7 +4649,7 @@@ "compare", "equality" ], - "time": "2017-11-03T07:16:52+00:00" - "time": "2018-01-12T06:34:42+00:00" ++ "time": "2018-02-01T13:46:46+00:00" }, { "name": "sebastian/diff", diff --cc config/services.php index 31d5a09cf,81f2af360..8b602a5d5 --- a/config/services.php +++ b/config/services.php @@@ -94,14 -94,13 +94,21 @@@ return 'name' => 'Okta', ], + 'gitlab' => [ + 'client_id' => env('GITLAB_APP_ID'), + 'client_secret' => env('GITLAB_APP_SECRET'), + 'redirect' => env('APP_URL') . '/login/service/gitlab/callback', + 'instance_uri' => env('GITLAB_BASE_URI'), // needs only for GitLab self hosted + 'name' => 'Gitlab', + ], + + 'twitch' => [ + 'client_id' => env('TWITCH_APP_ID'), + 'client_secret' => env('TWITCH_APP_SECRET'), + 'redirect' => env('APP_URL') . '/login/service/twitch/callback', + 'name' => 'Twitch', + ], + 'ldap' => [ 'server' => env('LDAP_SERVER', false), 'dn' => env('LDAP_DN', false),