Skip to content

Commit

Permalink
[KOGITO-9520] Updating SDK to 4.0.4 (#3102)
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtirado authored and web-flow committed Jul 5, 2023
1 parent 95ca87b commit be4e040
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion kogito-build/kogito-dependencies-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<version.io.micrometer>1.9.4</version.io.micrometer>
<version.org.flywaydb>9.8.3</version.org.flywaydb>
<version.org.postgresql>42.5.1</version.org.postgresql>
<version.io.serverlessworkflow>4.0.3.Final</version.io.serverlessworkflow>
<version.io.serverlessworkflow>4.0.4.Final</version.io.serverlessworkflow>
<!-- Aligned with Quarkus 2.7 (LTS) - see https://issues.redhat.com/browse/KOGITO-7971 -->
<version.io.smallrye-open-api>2.2.1</version.io.smallrye-open-api>
<version.org.awaitility>4.2.0</version.org.awaitility>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.net.HttpURLConnection;
import java.net.URI;
import java.util.Base64;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
Expand All @@ -38,6 +39,7 @@
import io.serverlessworkflow.api.auth.BasicAuthDefinition;
import io.serverlessworkflow.api.auth.BearerAuthDefinition;
import io.serverlessworkflow.api.auth.OauthDefinition;
import io.serverlessworkflow.api.workflow.Auth;

class HttpContentLoader extends FallbackContentLoader {

Expand All @@ -58,9 +60,9 @@ protected byte[] loadURI(URI u) {
HttpURLConnection conn = (HttpURLConnection) u.toURL().openConnection();
// some http servers required specific accept header (*/* is specified for those we do not care about accept)
conn.setRequestProperty("Accept", "application/json,application/yaml,application/yml,application/text,text/*,*/*");
workflow.map(Workflow::getAuth)
workflow.map(Workflow::getAuth).map(Auth::getAuthDefs).stream().flatMap(Collection::stream)
.filter(auth -> Objects.equals(auth.getName(), authRef))
.ifPresent(auth -> addAuth(conn, auth));
.forEach(auth -> addAuth(conn, auth));
int code = conn.getResponseCode();
if (code == HttpURLConnection.HTTP_OK) {
try (InputStream is = conn.getInputStream()) {
Expand Down

0 comments on commit be4e040

Please sign in to comment.