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:
parent
5b804e2017
commit
e69f37f6fc
7 changed files with 33 additions and 3 deletions
|
@ -77,9 +77,9 @@ AZURE_RESOURCE_APP_ID=
|
|||
# Redirect URI is https://<URL>/auth/oidc.callback
|
||||
OIDC_CLIENT_ID=__OIDC_NAME__
|
||||
OIDC_CLIENT_SECRET=__OIDC_SECRET__
|
||||
OIDC_AUTH_URI=https://__DEX_DOMAIN____DEX_PATH__auth
|
||||
OIDC_TOKEN_URI=https://__DEX_DOMAIN____DEX_PATH__token
|
||||
OIDC_USERINFO_URI=https://__DEX_DOMAIN____DEX_PATH__userinfo
|
||||
OIDC_AUTH_URI=__DEX_AUTH_URI__
|
||||
OIDC_TOKEN_URI=__DEX_TOKEN_URI__
|
||||
OIDC_USERINFO_URI=__DEX_USER_URI__
|
||||
|
||||
# Specify which claims to derive user information from
|
||||
# Supports any valid JSON path with the JWT payload
|
||||
|
|
|
@ -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_name=$(ynh_app_setting_get --app=$dex_app --key=oidc_name)
|
||||
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
|
||||
|
|
|
@ -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_name=$(ynh_app_setting_get --app=$app --key=oidc_name)
|
||||
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
|
||||
|
|
|
@ -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)
|
||||
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
|
||||
#===================================================
|
||||
|
@ -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_secret --value=$oidc_secret
|
||||
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
|
||||
|
|
|
@ -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_name=$(ynh_app_setting_get --app=$app --key=oidc_name)
|
||||
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
|
||||
|
|
|
@ -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_name=$(ynh_app_setting_get --app=$app --key=oidc_name)
|
||||
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
|
||||
|
|
|
@ -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_name=$(ynh_app_setting_get --app=$app --key=oidc_name)
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue