File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 3939 "type" : " string"
4040 }
4141 },
42+ "auth_service_url" : {
43+ "description" : " URL to auth service, used for login redirects. Default: `/auth/`" ,
44+ "type" : " string"
45+ },
4246 "network_timeout" : {
4347 "description" : " Network timeout for requests forwarded to the QGIS Server, in seconds. Default: `30`" ,
4448 "type" : " number"
Original file line number Diff line number Diff line change 1313from ogcapi_service import OGCAPIService
1414
1515
16- # Autologin config
17- AUTH_PATH = os .environ .get (
18- 'AUTH_SERVICE_URL' ,
19- # For backward compatiblity
20- os .environ .get ('AUTH_PATH' , '/auth/' ))
21-
2216# Flask application
2317app = Flask (__name__ )
2418
@@ -83,7 +77,11 @@ def get_identity_or_auth(ogc_service):
8377
8478
8579def auth_path_prefix ():
86- return app .session_interface .tenant_path_prefix ().rstrip ("/" ) + "/" + AUTH_PATH .lstrip ("/" )
80+ tenant = tenant_handler .tenant ()
81+ config_handler = RuntimeConfig ("ogc" , app .logger )
82+ config = config_handler .tenant_config (tenant )
83+ auth_path = config .get ('auth_service_url' , '/auth/' )
84+ return app .session_interface .tenant_path_prefix ().rstrip ("/" ) + "/" + auth_path .lstrip ("/" )
8785
8886
8987@app .before_request
You can’t perform that action at this time.
0 commit comments