camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [camel] branch camel-2.23.x updated: CAMEL-13045 - Camel-Slack: The verifier must be able to validate webhook and token at the same time
Date Thu, 10 Jan 2019 07:33:28 GMT
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch camel-2.23.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-2.23.x by this push:
     new 30981cd  CAMEL-13045 - Camel-Slack: The verifier must be able to validate webhook
and token at the same time
30981cd is described below

commit 30981cd4f404cf40e6e11b70c2583d8bebc00222
Author: Andrea Cosentino <ancosen@gmail.com>
AuthorDate: Thu Jan 10 08:31:07 2019 +0100

    CAMEL-13045 - Camel-Slack: The verifier must be able to validate webhook and token at
the same time
---
 .../apache/camel/component/slack/SlackComponentVerifierExtension.java  | 3 ++-
 .../camel/component/slack/SlackComponentVerifierExtensionTest.java     | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackComponentVerifierExtension.java
b/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackComponentVerifierExtension.java
index 143c532..60cea8c 100644
--- a/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackComponentVerifierExtension.java
+++ b/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackComponentVerifierExtension.java
@@ -106,7 +106,8 @@ public class SlackComponentVerifierExtension extends DefaultComponentVerifierExt
             } catch (Exception e) {
                 builder.error(ResultErrorBuilder.withCodeAndDescription(VerificationError.StandardCode.AUTHENTICATION,
"Invalid webhookUrl").parameterKey("webhookUrl").build());
             }
-        } else if (ObjectHelper.isNotEmpty((String)parameters.get("token"))) {
+        } 
+        if (ObjectHelper.isNotEmpty((String)parameters.get("token"))) {
             String token = (String)parameters.get("token");
 
             try {
diff --git a/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackComponentVerifierExtensionTest.java
b/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackComponentVerifierExtensionTest.java
index 2b546b3..d3e1a56 100644
--- a/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackComponentVerifierExtensionTest.java
+++ b/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackComponentVerifierExtensionTest.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.slack;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import org.apache.camel.Component;


Mime
View raw message