1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-10-29 23:22:34 +01:00

Merge branch 'support_for_gitlub_auth' of git://github.com/pixwell-dev/BookStack into pixwell-dev-support_for_gitlub_auth

This commit is contained in:
Dan Brown 2018-02-04 17:51:30 +00:00
commit 9becc8055b
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
7 changed files with 57 additions and 5 deletions

View File

@ -50,6 +50,10 @@ OKTA_BASE_URL=false
OKTA_APP_ID=false
OKTA_APP_SECRET=false
GITLAB_APP_ID=false
GITLAB_APP_SECRET=false
GITLAB_BASE_URI=false
# External services such as Gravatar
DISABLE_EXTERNAL_SERVICES=false
@ -67,4 +71,4 @@ MAIL_HOST=localhost
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_ENCRYPTION=null

View File

@ -18,6 +18,7 @@ class EventServiceProvider extends ServiceProvider
'SocialiteProviders\Slack\SlackExtendSocialite@handle',
'SocialiteProviders\Azure\AzureExtendSocialite@handle',
'SocialiteProviders\Okta\OktaExtendSocialite@handle',
'SocialiteProviders\GitLab\GitLabExtendSocialite@handle',
],
];

View File

@ -16,7 +16,7 @@ class SocialAuthService
protected $socialite;
protected $socialAccount;
protected $validSocialDrivers = ['google', 'github', 'facebook', 'slack', 'twitter', 'azure', 'okta'];
protected $validSocialDrivers = ['google', 'github', 'facebook', 'slack', 'twitter', 'azure', 'okta', 'gitlab'];
/**
* SocialAuthService constructor.

View File

@ -18,7 +18,8 @@
"barryvdh/laravel-snappy": "^0.4.0",
"socialiteproviders/slack": "^3.0",
"socialiteproviders/microsoft-azure": "^3.0",
"socialiteproviders/okta": "^1.0"
"socialiteproviders/okta": "^1.0",
"socialiteproviders/gitlab": "^3.0"
},
"require-dev": {
"filp/whoops": "~2.0",

39
composer.lock generated
View File

@ -4,7 +4,7 @@
"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": "8ad5cb7acc1115a77404d1be899984ac",
"content-hash": "210685bb4ecd91f015682f5cf03ba84d",
"packages": [
{
"name": "aws/aws-sdk-php",
@ -2075,6 +2075,43 @@
],
"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",

View File

@ -92,7 +92,15 @@ return [
'redirect' => env('APP_URL') . '/login/service/okta/callback',
'base_url' => env('OKTA_BASE_URL'),
'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',
],
'ldap' => [
'server' => env('LDAP_SERVER', false),

View File

@ -0,0 +1 @@
<svg viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g id="Group"><path id="Fill-4" d="M32.134,64.345l11.785,-39.372l-23.569,0l11.784,39.372Z" style="fill:#e24329;"/><path id="Fill-8" d="M32.134,64.345l-11.784,-39.372l-16.515,0l28.299,39.372Z" style="fill:#fc6d26;"/><path id="Fill-12" d="M3.835,24.973l-3.581,11.965c-0.327,1.091 0.031,2.287 0.886,2.961l30.994,24.446l-28.299,-39.372Z" style="fill:#fca326;"/><path id="Fill-16" d="M3.835,24.973l16.515,0l-7.097,-23.713c-0.366,-1.22 -1.956,-1.22 -2.321,0l-7.097,23.713Z" style="fill:#e24329;"/><path id="Fill-18" d="M32.134,64.345l11.785,-39.372l16.515,0l-28.3,39.372Z" style="fill:#fc6d26;"/><path id="Fill-20" d="M60.434,24.973l3.581,11.965c0.326,1.091 -0.031,2.287 -0.886,2.961l-30.995,24.446l28.3,-39.372Z" style="fill:#fca326;"/><path id="Fill-22" d="M60.434,24.973l-16.515,0l7.097,-23.713c0.365,-1.22 1.955,-1.22 2.32,0l7.098,23.713Z" style="fill:#e24329;"/></g></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB