From b7d37ea02d3465f065d111138ca3eda42fe77bb9 Mon Sep 17 00:00:00 2001 From: Scot Mountenay Date: Tue, 24 Sep 2024 13:59:33 -0600 Subject: [PATCH] [Confluence] Fix to ensure service auth continues working after oauth support added --- confluence/provider/app.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/confluence/provider/app.py b/confluence/provider/app.py index f00049cd..e98efde0 100644 --- a/confluence/provider/app.py +++ b/confluence/provider/app.py @@ -12,9 +12,13 @@ def search(body): logger.debug(f'Search request: {body["query"]}') + access_token = get_access_token() + + if access_token == app.config.get("CONNECTOR_API_KEY", None): + access_token = None try: - data = provider.search(body["query"], get_access_token()) + data = provider.search(body["query"], access_token) logger.info(f"Found {len(data)} results") except UpstreamProviderError as error: logger.error(f"Upstream search error: {error.message}")