Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwenneg committed Feb 4, 2024
1 parent aefead1 commit 518c243
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ private void checkPayload(JsonObject cloudEventData) throws MalformedURLExceptio
@Deprecated(forRemoval = true)
private void extractLegacyAuthData(Exchange exchange, JsonObject endpointProperties) {


// not blank

if (endpointProperties.containsKey("secret_token")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@

import io.quarkus.test.junit.QuarkusTest;
import jakarta.inject.Inject;
import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.quarkus.test.CamelQuarkusTestSupport;
import org.apache.camel.support.DefaultExchange;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.junit.jupiter.api.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,16 @@ private static Optional<JsonObject> getAuthentication(WebhookProperties properti
"type", BASIC,
"secretId", properties.getBasicAuthenticationSourcesId()
));
} else if (properties.getSecretTokenSourcesId() != null) {
return Optional.of(JsonObject.of(
"type", SECRET_TOKEN,
"secretId", properties.getSecretTokenSourcesId()
));
} else if (properties.getBearerAuthenticationSourcesId() != null) {
return Optional.of(JsonObject.of(
"type", BEARER,
"secretId", properties.getBearerAuthenticationSourcesId()
));
} else if (properties.getSecretTokenSourcesId() != null) {
return Optional.of(JsonObject.of(
"type", SECRET_TOKEN,
"secretId", properties.getSecretTokenSourcesId()
));
} else {
return Optional.empty();
}
Expand Down

0 comments on commit 518c243

Please sign in to comment.