Skip to content

Commit

Permalink
[MNT-22836] - support PKCE code flow in SSO
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikiwanekhyland committed Nov 17, 2023
1 parent 99d3e08 commit 8028d70
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/src/app.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"clientId": "alfresco",
"scope": "openid",
"secret": "",
"implicitFlow": false,
"codeFlow": true,
"silentLogin": true,
"publicUrls": ["**/preview/s/*", "**/settings", "**/blank"],
Expand Down
7 changes: 7 additions & 0 deletions docker/docker-entrypoint.d/30-sed-on-appconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ if [ -n "${APP_CONFIG_OAUTH2_CLIENTID}" ]; then
-i "$APP_CONFIG_FILE"
fi

if [ -n "${APP_CONFIG_OAUTH2_IMPLICIT_FLOW}" ]; then
echo "SET APP_CONFIG_OAUTH2_IMPLICIT_FLOW"

sed -e "s/\"implicitFlow\": [^,]*/\"implicitFlow\": ${APP_CONFIG_OAUTH2_IMPLICIT_FLOW}/g" \
-i "$APP_CONFIG_FILE"
fi

if [ -n "${APP_CONFIG_OAUTH2_CODE_FLOW}" ]; then
echo "SET APP_CONFIG_OAUTH2_CODE_FLOW"

Expand Down
1 change: 1 addition & 0 deletions docs/getting-started/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ docker run --rm -it \
| APP_BASE_SHARE_URL | `baseShareUrl` |
| APP_CONFIG_OAUTH2_HOST | `oauth2.host` |
| APP_CONFIG_OAUTH2_CLIENTID | `oauth2.clientId` |
| APP_CONFIG_OAUTH2_IMPLICIT_FLOW | `oauth2.implicitFlow` |
| APP_CONFIG_OAUTH2_CODE_FLOW | `oauth2.codeFlow` |
| APP_CONFIG_OAUTH2_SILENT_LOGIN | `oauth2.silentLogin` |
| APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI | `oauth2.redirectSilentIframeUri` |
Expand Down
1 change: 1 addition & 0 deletions docs/getting-started/sso.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ You can find the settings in the `app.config.json` file, and they look similar t
"clientId": "alfresco",
"scope": "openid",
"secret": "",
"implicitFlow": false,
"codeFlow": true,
"silentLogin": true,
"redirectSilentIframeUri": "./assets/silent-refresh.html",
Expand Down
1 change: 1 addition & 0 deletions docs/ja/getting-started/sso.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Basic 認証に加えて、Content Application を以下で使用できます:
"clientId": "alfresco",
"scope": "openid",
"secret": "",
"implicitFlow": false,
"codeFlow": true,
"silentLogin": true,
"redirectSilentIframeUri": "./assets/silent-refresh.html",
Expand Down

0 comments on commit 8028d70

Please sign in to comment.