You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ja...@apache.org on 2020/01/08 18:36:08 UTC
[openwhisk-package-kafka] branch master updated: Handle cases when
authKey does not exist in DB documents (#366)
This is an automated email from the ASF dual-hosted git repository.
japetrsn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-package-kafka.git
The following commit(s) were added to refs/heads/master by this push:
new 0130bc2 Handle cases when authKey does not exist in DB documents (#366)
0130bc2 is described below
commit 0130bc2daef86329c7a9fb760e385438765f0fb4
Author: James Dubee <jw...@us.ibm.com>
AuthorDate: Wed Jan 8 13:36:00 2020 -0500
Handle cases when authKey does not exist in DB documents (#366)
---
provider/consumer.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/provider/consumer.py b/provider/consumer.py
index eb06c00..477b75d 100644
--- a/provider/consumer.py
+++ b/provider/consumer.py
@@ -160,8 +160,12 @@ class ConsumerProcess (Process):
if 'isIamKey' in params and params['isIamKey'] == True:
self.authHandler = IAMAuth(params['authKey'], params['iamUrl'])
else:
- auth = params['authKey'].split(':')
- self.authHandler = HTTPBasicAuth(auth[0], auth[1])
+ if 'authKey' in params:
+ auth = params['authKey'].split(':')
+ self.authHandler = HTTPBasicAuth(auth[0], auth[1])
+ else:
+ parsedUrl = urlparse(params["triggerURL"])
+ self.authHandler = HTTPBasicAuth(parsedUrl.username, parsedUrl.password)
# handle the case where there may be existing triggers that do not
# have the isJSONData field set