mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-25 09:42:10 +08:00
add support for gitlab authentification
This commit is contained in:
parent
1d5440493c
commit
44d8f39037
|
@ -50,6 +50,10 @@ OKTA_BASE_URL=false
|
||||||
OKTA_KEY=false
|
OKTA_KEY=false
|
||||||
OKTA_SECRET=false
|
OKTA_SECRET=false
|
||||||
|
|
||||||
|
GITLAB_KEY=false
|
||||||
|
GITLAB_SECRET=false
|
||||||
|
GITLAB_INSTANCE_URI=false
|
||||||
|
|
||||||
# External services such as Gravatar
|
# External services such as Gravatar
|
||||||
DISABLE_EXTERNAL_SERVICES=false
|
DISABLE_EXTERNAL_SERVICES=false
|
||||||
|
|
||||||
|
@ -67,4 +71,4 @@ MAIL_HOST=localhost
|
||||||
MAIL_PORT=1025
|
MAIL_PORT=1025
|
||||||
MAIL_USERNAME=null
|
MAIL_USERNAME=null
|
||||||
MAIL_PASSWORD=null
|
MAIL_PASSWORD=null
|
||||||
MAIL_ENCRYPTION=null
|
MAIL_ENCRYPTION=null
|
||||||
|
|
|
@ -18,6 +18,7 @@ class EventServiceProvider extends ServiceProvider
|
||||||
'SocialiteProviders\Slack\SlackExtendSocialite@handle',
|
'SocialiteProviders\Slack\SlackExtendSocialite@handle',
|
||||||
'SocialiteProviders\Azure\AzureExtendSocialite@handle',
|
'SocialiteProviders\Azure\AzureExtendSocialite@handle',
|
||||||
'SocialiteProviders\Okta\OktaExtendSocialite@handle',
|
'SocialiteProviders\Okta\OktaExtendSocialite@handle',
|
||||||
|
'SocialiteProviders\GitLab\GitLabExtendSocialite@handle',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ class SocialAuthService
|
||||||
protected $socialite;
|
protected $socialite;
|
||||||
protected $socialAccount;
|
protected $socialAccount;
|
||||||
|
|
||||||
protected $validSocialDrivers = ['google', 'github', 'facebook', 'slack', 'twitter', 'azure', 'okta'];
|
protected $validSocialDrivers = ['google', 'github', 'facebook', 'slack', 'twitter', 'azure', 'okta', 'gitlab'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SocialAuthService constructor.
|
* SocialAuthService constructor.
|
||||||
|
|
|
@ -18,7 +18,8 @@
|
||||||
"barryvdh/laravel-snappy": "^0.4.0",
|
"barryvdh/laravel-snappy": "^0.4.0",
|
||||||
"socialiteproviders/slack": "^3.0",
|
"socialiteproviders/slack": "^3.0",
|
||||||
"socialiteproviders/microsoft-azure": "^3.0",
|
"socialiteproviders/microsoft-azure": "^3.0",
|
||||||
"socialiteproviders/okta": "^1.0"
|
"socialiteproviders/okta": "^1.0",
|
||||||
|
"socialiteproviders/gitlab": "^3.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"filp/whoops": "~2.0",
|
"filp/whoops": "~2.0",
|
||||||
|
|
|
@ -92,7 +92,15 @@ return [
|
||||||
'redirect' => env('APP_URL') . '/login/service/okta/callback',
|
'redirect' => env('APP_URL') . '/login/service/okta/callback',
|
||||||
'base_url' => env('OKTA_BASE_URL'),
|
'base_url' => env('OKTA_BASE_URL'),
|
||||||
'name' => 'Okta',
|
'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' => [
|
'ldap' => [
|
||||||
'server' => env('LDAP_SERVER', false),
|
'server' => env('LDAP_SERVER', false),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user