Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KOGITO-9520] Updating SDK to 4.0.4 #3102

Merged
merged 1 commit into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.10.2</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>3.1.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