]> BookStack Code Mirror - bookstack/commitdiff
add support for gitlab authentification
authorJozef Balún <redacted>
Wed, 31 Jan 2018 15:02:07 +0000 (16:02 +0100)
committerJozef Balún <redacted>
Wed, 31 Jan 2018 15:02:07 +0000 (16:02 +0100)
.env.example
app/Providers/EventServiceProvider.php
app/Services/SocialAuthService.php
composer.json
config/services.php

index ddb32c0bc24b43395251c29a55f5ea46d820d39e..279d0f5e908c7d727237968e60dc27b6e7ad4684 100644 (file)
@@ -50,6 +50,10 @@ OKTA_BASE_URL=false
 OKTA_KEY=false
 OKTA_SECRET=false
 
+GITLAB_KEY=false
+GITLAB_SECRET=false
+GITLAB_INSTANCE_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
\ No newline at end of file
+MAIL_ENCRYPTION=null
index 05f9c57c117e2b71111d49fb5308d47d847faeaa..dec7b98c6804a110ebf076130360e912dd9e8ed0 100644 (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',
         ],
     ];
 
index 30f7eed0e3dab57a485db4e2b6cd52fcc1d6a964..c31e67d0d95fc8f2af8a126954ec078558191cd0 100644 (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.
index 2750b7cb3b26bb5822b29a057785081e888ed17d..10b3592c8b4536234304083d70309cef1743787f 100644 (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",
index 18649c093ef379b996ca6fcbb6c96e2fc4891098..17f54ab45d3c4e22758a0f5d9724f1f835d36a7a 100644 (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_KEY'),
+       'client_secret' => env('GITLAB_SECRET'),
+       'redirect' => env('APP_URL') . '/login/service/gitlab/callback',
+       'instance_uri' => env('GITLAB_INSTANCE_URI'), // needs only for GitLab self hosted
+       'name'          => 'Gitlab',
+    ],
 
     'ldap' => [
         'server' => env('LDAP_SERVER', false),
Morty Proxy This is a proxified and sanitized view of the page, visit original site.