mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-18 13:58:25 +00:00
Merge pull request #2841 from massej/patch-1
Added - OAuth2 Generic - missing label and scope variables
This commit is contained in:
commit
daae8b70d3
10
README.md
10
README.md
@ -718,7 +718,7 @@ Also you can configure v2 endpoint (`azure_activedirectory_v2`) by using `OAUTH_
|
||||
|
||||
To enable the Generic OAuth2 provider, you must register your application with your provider. You also need to confirm OAuth2 provider app's ID and secret, the client options and the user's response structure.
|
||||
|
||||
As an example this code has been tested with Keycloak, with the following variables: `OAUTH2_GENERIC_APP_ID`, `OAUTH2_GENERIC_APP_SECRET`, `OAUTH2_GENERIC_CLIENT_SITE`, `OAUTH2_GENERIC_CLIENT_USER_INFO_URL`, `OAUTH2_GENERIC_CLIENT_AUTHORIZE_URL`, `OAUTH2_GENERIC_CLIENT_TOKEN_URL`, `OAUTH2_GENERIC_CLIENT_END_SESSION_ENDPOINT`, `OAUTH2_GENERIC_ID_PATH`, `OAUTH2_GENERIC_USER_UID`, `OAUTH2_GENERIC_USER_NAME`, `OAUTH2_GENERIC_USER_EMAIL`, `OAUTH2_GENERIC_NAME`,
|
||||
As an example this code has been tested with Keycloak, with the following variables: `OAUTH2_GENERIC_APP_ID`, `OAUTH2_GENERIC_APP_SECRET`, `OAUTH2_GENERIC_CLIENT_SITE`, `OAUTH2_GENERIC_CLIENT_USER_INFO_URL`, `OAUTH2_GENERIC_CLIENT_AUTHORIZE_URL`, `OAUTH2_GENERIC_CLIENT_TOKEN_URL`, `OAUTH2_GENERIC_CLIENT_END_SESSION_ENDPOINT`, `OAUTH2_GENERIC_ID_PATH`, `OAUTH2_GENERIC_USER_UID`, `OAUTH2_GENERIC_USER_NAME`, `OAUTH2_GENERIC_USER_EMAIL`, `OAUTH2_GENERIC_AUTHORIZE_PARAMS_SCOPE`, `OAUTH2_GENERIC_LABEL` and `OAUTH2_GENERIC_NAME`.
|
||||
|
||||
See [GitLab documentation](https://docs.gitlab.com/ee/integration/oauth2_generic.html#sign-into-gitlab-with-almost-any-oauth2-provider) and [Omniauth-oauth2-generic documentation](https://gitlab.com/satorix/omniauth-oauth2-generic) for more details.
|
||||
|
||||
@ -2279,6 +2279,14 @@ The OAuth2 generic user name. No defaults
|
||||
|
||||
The OAuth2 generic user email. No defaults
|
||||
|
||||
##### `OAUTH2_GENERIC_AUTHORIZE_PARAMS_SCOPE`
|
||||
|
||||
The scope of your OAuth2 provider. No defaults
|
||||
|
||||
##### `OAUTH2_GENERIC_LABEL`
|
||||
|
||||
The label of your OAuth2 provider. No defaults
|
||||
|
||||
##### `OAUTH2_GENERIC_NAME`
|
||||
|
||||
The name of your OAuth2 provider. No defaults
|
||||
|
||||
@ -1017,6 +1017,8 @@ production: &base
|
||||
email: '{{OAUTH2_GENERIC_USER_EMAIL}}'
|
||||
}
|
||||
},
|
||||
authorize_params: { scope: "{{OAUTH2_GENERIC_AUTHORIZE_PARAMS_SCOPE}}" },
|
||||
label: '{{OAUTH2_GENERIC_LABEL}}',
|
||||
name: '{{OAUTH2_GENERIC_NAME}}' }}
|
||||
- { name: 'azure_oauth2',
|
||||
args: {
|
||||
|
||||
@ -531,6 +531,8 @@ OAUTH2_GENERIC_ID_PATH=${OAUTH2_GENERIC_ID_PATH:-}
|
||||
OAUTH2_GENERIC_USER_UID=${OAUTH2_GENERIC_USER_UID:-}
|
||||
OAUTH2_GENERIC_USER_NAME=${OAUTH2_GENERIC_USER_NAME:-}
|
||||
OAUTH2_GENERIC_USER_EMAIL=${OAUTH2_GENERIC_USER_EMAIL:-}
|
||||
OAUTH2_GENERIC_AUTHORIZE_PARAMS_SCOPE=${OAUTH2_GENERIC_AUTHORIZE_PARAMS_SCOPE:-}
|
||||
OAUTH2_GENERIC_LABEL=${OAUTH2_GENERIC_LABEL:-}
|
||||
OAUTH2_GENERIC_NAME=${OAUTH2_GENERIC_NAME:-}
|
||||
|
||||
## ANALYTICS
|
||||
|
||||
@ -722,6 +722,8 @@ gitlab_configure_oauth2_generic() {
|
||||
OAUTH2_GENERIC_USER_UID \
|
||||
OAUTH2_GENERIC_USER_NAME \
|
||||
OAUTH2_GENERIC_USER_EMAIL \
|
||||
OAUTH2_GENERIC_AUTHORIZE_PARAMS_SCOPE \
|
||||
OAUTH2_GENERIC_LABEL \
|
||||
OAUTH2_GENERIC_NAME
|
||||
else
|
||||
exec_as_git sed -i "/name: 'oauth2_generic'/,/{{OAUTH2_GENERIC_NAME}}/d" ${GITLAB_CONFIG}
|
||||
|
||||
@ -163,6 +163,8 @@ services:
|
||||
- OAUTH2_GENERIC_USER_UID=
|
||||
- OAUTH2_GENERIC_USER_NAME=
|
||||
- OAUTH2_GENERIC_USER_EMAIL=
|
||||
- OAUTH2_GENERIC_AUTHORIZE_PARAMS_SCOPE=
|
||||
- OAUTH2_GENERIC_LABEL=
|
||||
- OAUTH2_GENERIC_NAME=
|
||||
|
||||
- OAUTH_AZURE_API_KEY=
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user