فهرست منبع

- OAUTH2_LOGIN_STYLE popup or redirect, part 2.

Thanks to xet7 !
Lauri Ojansivu 6 سال پیش
والد
کامیت
7919ae3628
9فایلهای تغییر یافته به همراه39 افزوده شده و 4 حذف شده
  1. 2 0
      Dockerfile
  2. 6 0
      docker-compose.yml
  3. 2 1
      rebuild-wekan.bat
  4. 7 1
      releases/virtualbox/start-wekan.sh
  5. 1 1
      server/authentication.js
  6. 0 0
      snap-src/bin/config
  7. 6 0
      snap-src/bin/wekan-help
  8. 7 0
      start-wekan.bat
  9. 8 1
      start-wekan.sh

+ 2 - 0
Dockerfile

@@ -27,6 +27,7 @@ ARG BROWSER_POLICY_ENABLED
 ARG TRUSTED_URL
 ARG WEBHOOKS_ATTRIBUTES
 ARG OAUTH2_ENABLED
+ARG OAUTH2_LOGIN_STYLE
 ARG OAUTH2_CLIENT_ID
 ARG OAUTH2_SECRET
 ARG OAUTH2_SERVER_URL
@@ -123,6 +124,7 @@ ENV BUILD_DEPS="apt-utils bsdtar gnupg gosu wget curl bzip2 build-essential pyth
     TRUSTED_URL="" \
     WEBHOOKS_ATTRIBUTES="" \
     OAUTH2_ENABLED=false \
+    OAUTH2_LOGIN_STYLE=redirect \
     OAUTH2_CLIENT_ID="" \
     OAUTH2_SECRET="" \
     OAUTH2_SERVER_URL="" \

+ 6 - 0
docker-compose.yml

@@ -272,6 +272,8 @@ services:
       # 2) Configure the environment variables. This differs slightly
       #     by installation type, but make sure you have the following:
       #- OAUTH2_ENABLED=true
+      # OAuth2 login style: popup or redirect.
+      #- OAUTH2_LOGIN_STYLE=redirect
       # Application GUID captured during app registration:
       #- OAUTH2_CLIENT_ID=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
       # Secret key generated during app registration:
@@ -292,6 +294,8 @@ services:
       # ==== OAUTH2 KEYCLOAK ====
       # https://github.com/wekan/wekan/wiki/Keycloak  <== MAPPING INFO, REQUIRED
       #- OAUTH2_ENABLED=true
+      # OAuth2 login style: popup or redirect.
+      #- OAUTH2_LOGIN_STYLE=redirect
       #- OAUTH2_CLIENT_ID=<Keycloak create Client ID>
       #- OAUTH2_SERVER_URL=<Keycloak server name>/auth
       #- OAUTH2_AUTH_ENDPOINT=/realms/<keycloak realm>/protocol/openid-connect/auth
@@ -305,6 +309,8 @@ services:
       # Enable the OAuth2 connection
       #- OAUTH2_ENABLED=true
       # OAuth2 docs: https://github.com/wekan/wekan/wiki/OAuth2
+      # OAuth2 login style: popup or redirect.
+      #- OAUTH2_LOGIN_STYLE=redirect
       # OAuth2 Client ID.
       #- OAUTH2_CLIENT_ID=abcde12345
       # OAuth2 Secret.

+ 2 - 1
rebuild-wekan.bat

@@ -1,6 +1,7 @@
 @ECHO OFF
 
-REM IN PROGRESS: Build on Windows.
+REM NOTE: THIS .BAT DOES NOT WORK !!
+REM Use instead this webpage instructions to build on Windows:
 REM https://github.com/wekan/wekan/wiki/Install-Wekan-from-source-on-Windows
 REM Please add fix PRs, like config of MongoDB etc.
 

+ 7 - 1
releases/virtualbox/start-wekan.sh

@@ -71,6 +71,8 @@
         # 2) Configure the environment variables. This differs slightly
         #     by installation type, but make sure you have the following:
         #export OAUTH2_ENABLED=true
+        # OAuth2 login style: popup or redirect.
+        #export OAUTH2_LOGIN_STYLE=redirect
         # Application GUID captured during app registration:
         #export OAUTH2_CLIENT_ID=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
         # Secret key generated during app registration:
@@ -91,6 +93,8 @@
         # ==== OAUTH2 KEYCLOAK ====
         # https://github.com/wekan/wekan/wiki/Keycloak  <== MAPPING INFO, REQUIRED
         #export OAUTH2_ENABLED=true
+        # OAuth2 login style: popup or redirect.
+        #export OAUTH2_LOGIN_STYLE=redirect
         #export OAUTH2_CLIENT_ID=<Keycloak create Client ID>
         #export OAUTH2_SERVER_URL=<Keycloak server name>/auth
         #export OAUTH2_AUTH_ENDPOINT=/realms/<keycloak realm>/protocol/openid-connect/auth
@@ -99,11 +103,13 @@
         #export OAUTH2_SECRET=<keycloak client secret>
         #-----------------------------------------------------------------
         # ==== OAUTH2 DOORKEEPER ====
+        # OAuth2 docs: https://github.com/wekan/wekan/wiki/OAuth2
         # https://github.com/wekan/wekan/issues/1874
         # https://github.com/wekan/wekan/wiki/OAuth2
         # Enable the OAuth2 connection
         #export OAUTH2_ENABLED=true
-        # OAuth2 docs: https://github.com/wekan/wekan/wiki/OAuth2
+        # OAuth2 login style: popup or redirect.
+        #export OAUTH2_LOGIN_STYLE=redirect
         # OAuth2 Client ID.
         #export OAUTH2_CLIENT_ID=abcde12345
         # OAuth2 Secret.

+ 1 - 1
server/authentication.js

@@ -69,7 +69,7 @@ Meteor.startup(() => {
         { service: 'oidc' },
         {
           $set: {
-            loginStyle: 'redirect',
+            loginStyle: process.env.OAUTH2_LOGIN_STYLE,
             clientId: process.env.OAUTH2_CLIENT_ID,
             secret: process.env.OAUTH2_SECRET,
             serverUrl: process.env.OAUTH2_SERVER_URL,

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
snap-src/bin/config


+ 6 - 0
snap-src/bin/wekan-help

@@ -94,6 +94,12 @@ echo -e "\t$ snap set $SNAP_NAME oauth2-client-id='54321abcde'"
 echo -e "\t-Disable the OAuth2 Client ID of Wekan:"
 echo -e "\t$ snap set $SNAP_NAME oauth2-client-id=''"
 echo -e "\n"
+echo -e "OAuth2 login style: popup or redirect. Default: redirect"
+echo -e "To enable the OAuth2 login style popup of Wekan:"
+echo -e "\t$ snap set $SNAP_NAME oauth2-login-style='popup'"
+echo -e "\t-Disable the OAuth2 login style popup of Wekan:"
+echo -e "\t$ snap set $SNAP_NAME oauth2-login-style='redirect'"
+echo -e "\n"
 echo -e "OAuth2 Secret."
 echo -e "To enable the OAuth2 Secret of Wekan:"
 echo -e "\t$ snap set $SNAP_NAME oauth2-secret='54321abcde'"

+ 7 - 0
start-wekan.bat

@@ -1,5 +1,12 @@
 REM ------------------------------------------------------------
 
+REM NOTE: THIS .BAT DOES NOT WORK !!
+REM Use instead this webpage instructions to build on Windows:
+REM https://github.com/wekan/wekan/wiki/Install-Wekan-from-source-on-Windows
+REM Please add fix PRs, like config of MongoDB etc.
+
+REM ------------------------------------------------------------
+
 REM # Debug OIDC OAuth2 etc.
 REM SET DEBUG=true
 

+ 8 - 1
start-wekan.sh

@@ -89,6 +89,9 @@ function wekan_repo_check(){
       # 2) Configure the environment variables. This differs slightly
       #     by installation type, but make sure you have the following:
       #export OAUTH2_ENABLED=true
+      # OAuth2 docs: https://github.com/wekan/wekan/wiki/OAuth2
+      # OAuth2 login style: popup or redirect.
+      #export OAUTH2_LOGIN_STYLE=redirect
       # Application GUID captured during app registration:
       #export OAUTH2_CLIENT_ID=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
       # Secret key generated during app registration:
@@ -109,6 +112,8 @@ function wekan_repo_check(){
       # ==== OAUTH2 KEYCLOAK ====
       # https://github.com/wekan/wekan/wiki/Keycloak  <== MAPPING INFO, REQUIRED
       #export OAUTH2_ENABLED=true
+      # OAuth2 login style: popup or redirect.
+      #export OAUTH2_LOGIN_STYLE=redirect
       #export OAUTH2_CLIENT_ID=<Keycloak create Client ID>
       #export OAUTH2_SERVER_URL=<Keycloak server name>/auth
       #export OAUTH2_AUTH_ENDPOINT=/realms/<keycloak realm>/protocol/openid-connect/auth
@@ -117,11 +122,13 @@ function wekan_repo_check(){
       #export OAUTH2_SECRET=<keycloak client secret>
       #-----------------------------------------------------------------
       # ==== OAUTH2 DOORKEEPER ====
+      # OAuth2 docs: https://github.com/wekan/wekan/wiki/OAuth2
       # https://github.com/wekan/wekan/issues/1874
       # https://github.com/wekan/wekan/wiki/OAuth2
       # Enable the OAuth2 connection
       #export OAUTH2_ENABLED=true
-      # OAuth2 docs: https://github.com/wekan/wekan/wiki/OAuth2
+      # OAuth2 login style: popup or redirect.
+      #export OAUTH2_LOGIN_STYLE=redirect
       # OAuth2 Client ID.
       #export OAUTH2_CLIENT_ID=abcde12345
       # OAuth2 Secret.

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است