1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/outline_ynh.git synced 2024-09-03 19:56:12 +02:00

Cover the dex path /example case

This commit is contained in:
Limezy 2022-04-01 21:42:10 +07:00
parent 5b804e2017
commit e69f37f6fc
7 changed files with 33 additions and 3 deletions

View file

@ -77,9 +77,9 @@ AZURE_RESOURCE_APP_ID=
# Redirect URI is https://<URL>/auth/oidc.callback # Redirect URI is https://<URL>/auth/oidc.callback
OIDC_CLIENT_ID=__OIDC_NAME__ OIDC_CLIENT_ID=__OIDC_NAME__
OIDC_CLIENT_SECRET=__OIDC_SECRET__ OIDC_CLIENT_SECRET=__OIDC_SECRET__
OIDC_AUTH_URI=https://__DEX_DOMAIN____DEX_PATH__auth OIDC_AUTH_URI=__DEX_AUTH_URI__
OIDC_TOKEN_URI=https://__DEX_DOMAIN____DEX_PATH__token OIDC_TOKEN_URI=__DEX_TOKEN_URI__
OIDC_USERINFO_URI=https://__DEX_DOMAIN____DEX_PATH__userinfo OIDC_USERINFO_URI=__DEX_USER_URI__
# Specify which claims to derive user information from # Specify which claims to derive user information from
# Supports any valid JSON path with the JWT payload # Supports any valid JSON path with the JWT payload

View file

@ -47,6 +47,9 @@ dex_path=$(ynh_app_setting_get --app=$dex_app --key=dex_path)
oidc_secret=$(ynh_app_setting_get --app=$dex_app --key=oidc_secret) oidc_secret=$(ynh_app_setting_get --app=$dex_app --key=oidc_secret)
oidc_name=$(ynh_app_setting_get --app=$dex_app --key=oidc_name) oidc_name=$(ynh_app_setting_get --app=$dex_app --key=oidc_name)
oidc_callback=$(ynh_app_setting_get --app=$dex_app --key=oidc_callback) oidc_callback=$(ynh_app_setting_get --app=$dex_app --key=oidc_callback)
dex_auth_uri=$(ynh_app_setting_get --app=$app --key=dex_auth_uri)
dex_token_uri=$(ynh_app_setting_get --app=$app --key=dex_token_uri)
dex_user_uri=$(ynh_app_setting_get --app=$app --key=dex_user_uri)
#================================================= #=================================================
# DECLARE DATA AND CONF FILES TO BACKUP # DECLARE DATA AND CONF FILES TO BACKUP

View file

@ -46,6 +46,9 @@ dex_path=$(ynh_app_setting_get --app=$app --key=dex_path)
oidc_secret=$(ynh_app_setting_get --app=$app --key=oidc_secret) oidc_secret=$(ynh_app_setting_get --app=$app --key=oidc_secret)
oidc_name=$(ynh_app_setting_get --app=$app --key=oidc_name) oidc_name=$(ynh_app_setting_get --app=$app --key=oidc_name)
oidc_callback=$(ynh_app_setting_get --app=$app --key=oidc_callback) oidc_callback=$(ynh_app_setting_get --app=$app --key=oidc_callback)
dex_auth_uri=$(ynh_app_setting_get --app=$app --key=dex_auth_uri)
dex_token_uri=$(ynh_app_setting_get --app=$app --key=dex_token_uri)
dex_user_uri=$(ynh_app_setting_get --app=$app --key=dex_user_uri)
#================================================= #=================================================
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP

View file

@ -82,6 +82,18 @@ yunohost app install https://github.com/YunoHost-Apps/dex_ynh --force --args "do
dex_app=$(gawk 'match($0, /Installation of (.+) completed/, app) {print app[1]}' dexlog.txt) dex_app=$(gawk 'match($0, /Installation of (.+) completed/, app) {print app[1]}' dexlog.txt)
rm dexlog.txt rm dexlog.txt
# Create Dex URIs
if [ $i$dex_path -eq "/" ]
then
dex_auth_uri="https://$dex_domain/auth"
dex_token_uri="https://$dex_domain/token"
dex_user_uri="https://$dex_domain/userinfo"
else
dex_auth_uri="https://$dex_domain$dex_path/auth"
dex_token_uri="https://$dex_domain$dex_path/token"
dex_user_uri="https://$dex_domain$dex_path/userinfo"
fi
#=================================================== #===================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#=================================================== #===================================================
@ -110,6 +122,9 @@ ynh_app_setting_set --app=$app --key=dex_path --value=$dex_path
ynh_app_setting_set --app=$app --key=oidc_name --value=$oidc_name ynh_app_setting_set --app=$app --key=oidc_name --value=$oidc_name
ynh_app_setting_set --app=$app --key=oidc_secret --value=$oidc_secret ynh_app_setting_set --app=$app --key=oidc_secret --value=$oidc_secret
ynh_app_setting_set --app=$app --key=oidc_callback --value=$oidc_callback ynh_app_setting_set --app=$app --key=oidc_callback --value=$oidc_callback
ynh_app_setting_set --app=$app --key=dex_auth_uri --value=$dex_auth_uri
ynh_app_setting_set --app=$app --key=dex_token_uri --value=$dex_token_uri
ynh_app_setting_set --app=$app --key=dex_user_uri --value=$dex_user_uri
#================================================= #=================================================
# STANDARD MODIFICATIONS # STANDARD MODIFICATIONS

View file

@ -34,6 +34,9 @@ dex_path=$(ynh_app_setting_get --app=$app --key=dex_path)
oidc_secret=$(ynh_app_setting_get --app=$app --key=oidc_secret) oidc_secret=$(ynh_app_setting_get --app=$app --key=oidc_secret)
oidc_name=$(ynh_app_setting_get --app=$app --key=oidc_name) oidc_name=$(ynh_app_setting_get --app=$app --key=oidc_name)
oidc_callback=$(ynh_app_setting_get --app=$app --key=oidc_callback) oidc_callback=$(ynh_app_setting_get --app=$app --key=oidc_callback)
dex_auth_uri=$(ynh_app_setting_get --app=$app --key=dex_auth_uri)
dex_token_uri=$(ynh_app_setting_get --app=$app --key=dex_token_uri)
dex_user_uri=$(ynh_app_setting_get --app=$app --key=dex_user_uri)
#================================================= #=================================================
# STANDARD REMOVE # STANDARD REMOVE

View file

@ -56,6 +56,9 @@ dex_path=$(ynh_app_setting_get --app=$app --key=dex_path)
oidc_secret=$(ynh_app_setting_get --app=$app --key=oidc_secret) oidc_secret=$(ynh_app_setting_get --app=$app --key=oidc_secret)
oidc_name=$(ynh_app_setting_get --app=$app --key=oidc_name) oidc_name=$(ynh_app_setting_get --app=$app --key=oidc_name)
oidc_callback=$(ynh_app_setting_get --app=$app --key=oidc_callback) oidc_callback=$(ynh_app_setting_get --app=$app --key=oidc_callback)
dex_auth_uri=$(ynh_app_setting_get --app=$app --key=dex_auth_uri)
dex_token_uri=$(ynh_app_setting_get --app=$app --key=dex_token_uri)
dex_user_uri=$(ynh_app_setting_get --app=$app --key=dex_user_uri)
#================================================= #=================================================
# CHECK IF THE APP CAN BE RESTORED # CHECK IF THE APP CAN BE RESTORED

View file

@ -35,6 +35,9 @@ dex_path=$(ynh_app_setting_get --app=$app --key=dex_path)
oidc_secret=$(ynh_app_setting_get --app=$app --key=oidc_secret) oidc_secret=$(ynh_app_setting_get --app=$app --key=oidc_secret)
oidc_name=$(ynh_app_setting_get --app=$app --key=oidc_name) oidc_name=$(ynh_app_setting_get --app=$app --key=oidc_name)
oidc_callback=$(ynh_app_setting_get --app=$app --key=oidc_callback) oidc_callback=$(ynh_app_setting_get --app=$app --key=oidc_callback)
dex_auth_uri=$(ynh_app_setting_get --app=$app --key=dex_auth_uri)
dex_token_uri=$(ynh_app_setting_get --app=$app --key=dex_token_uri)
dex_user_uri=$(ynh_app_setting_get --app=$app --key=dex_user_uri)
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION