diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 9689f48af33..95d34f8ce30 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,4 +1,4 @@ # This file controls which users are required reviewers for given segments of the repository -* @inrupt/enterprise-solid-server +* @inrupt/engineering diff --git a/.github/workflows/cd-config.yml b/.github/workflows/cd-config.yml index f6d03ae8334..5a52d7d55f7 100644 --- a/.github/workflows/cd-config.yml +++ b/.github/workflows/cd-config.yml @@ -3,11 +3,9 @@ name: Solid Java Client CD on: push: branches: - - main + - 1.1 tags: - - inrupt-client-[0-9]+.[0-9]+.[0-9]+ - - inrupt-client-[0-9]+.[0-9]+.[0-9]+.Alpha[0-9]+ - - inrupt-client-[0-9]+.[0-9]+.[0-9]+.Beta[0-9]+ + - inrupt-client-1.1.[0-9]+ jobs: deployment: @@ -30,7 +28,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: 17 @@ -67,7 +65,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: 17 @@ -85,7 +83,7 @@ jobs: echo "VERSION_DIR=./${VERSION}/" >> $GITHUB_ENV - name: Publish tagged site to GitHub pages - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 if: ${{ startsWith(github.event.ref, 'refs/tags/inrupt-client') }} with: keep_files: true @@ -93,7 +91,7 @@ jobs: personal_token: ${{ secrets.GITHUB_TOKEN }} - name: Publish versioned site to GitHub pages - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: keep_files: true publish_dir: ./target/staging/ diff --git a/.github/workflows/ci-config.yml b/.github/workflows/ci-config.yml index b1324604ad2..0238e9472a2 100644 --- a/.github/workflows/ci-config.yml +++ b/.github/workflows/ci-config.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: ${{ matrix.java }} @@ -62,7 +62,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: ${{ matrix.java }} @@ -83,7 +83,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: ${{ matrix.java }} @@ -103,11 +103,22 @@ jobs: - uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: ${{ matrix.java }} cache: 'maven' - - name: Build the code with Maven - run: mvn -B -ntp verify -Pdependencies + - name: Generate Cache Name + shell: bash + run: echo "CACHE_NAME=$(date '+%y.%j')" >> $GITHUB_ENV + + - name: Restore NVD data cache + uses: actions/cache@v4 + with: + key: nvd-data-${{ env.CACHE_NAME }} + restore-keys: nvd-data- + path: ./data/cache + + - name: Verify dependencies + run: mvn -B -ntp verify -Pdependencies -Dnvd.api.datafeed="file:${GITHUB_WORKSPACE}/data/cache/nvdcve-{0}.json.gz" diff --git a/.github/workflows/site-ci-config.yml b/.github/workflows/site-ci-config.yml index 1af4e23f894..ba7e9ff08a3 100644 --- a/.github/workflows/site-ci-config.yml +++ b/.github/workflows/site-ci-config.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: ${{ matrix.java }} diff --git a/access-grant/pom.xml b/access-grant/pom.xml index 06c8f23a966..d5e25c6f03f 100644 --- a/access-grant/pom.xml +++ b/access-grant/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-accessgrant diff --git a/access-grant/src/main/java/com/inrupt/client/accessgrant/AccessGrantClient.java b/access-grant/src/main/java/com/inrupt/client/accessgrant/AccessGrantClient.java index 6d74bde4b37..fd243795185 100644 --- a/access-grant/src/main/java/com/inrupt/client/accessgrant/AccessGrantClient.java +++ b/access-grant/src/main/java/com/inrupt/client/accessgrant/AccessGrantClient.java @@ -53,7 +53,6 @@ import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionStage; -import java.util.stream.Collectors; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -397,30 +396,27 @@ private CompletionStage> query(final URI re throw new AccessGrantException("Unsupported type " + clazz + " in query request"); } - return v1Metadata().thenCompose(metadata -> { - final List>> responses = buildQuery(config.getIssuer(), type, - resource, creator, recipient, purposes, modes).stream() - .map(data -> Request.newBuilder(metadata.queryEndpoint) + return v1Metadata().thenApply(metadata -> { + final List responses = new ArrayList<>(); + for (final Map data : + buildQuery(config.getIssuer(), type, resource, creator, recipient, purposes, modes)) { + final Request req = Request.newBuilder(metadata.queryEndpoint) .header(CONTENT_TYPE, APPLICATION_JSON) - .POST(Request.BodyPublishers.ofByteArray(serialize(data))).build()) - .map(req -> client.send(req, Response.BodyHandlers.ofInputStream()) - .toCompletableFuture()) - .collect(Collectors.toList()); - - return CompletableFuture.allOf(responses.toArray(new CompletableFuture[0])) - .thenApply(x -> responses.stream().map(CompletableFuture::join).map(response -> { - try (final InputStream input = response.body()) { - final int status = response.statusCode(); - if (isSuccess(status)) { - return processQueryResponse(input, supportedTypes, clazz); - } - throw new AccessGrantException("Unable to perform Access Grant query: HTTP error " + - status, status); - } catch (final IOException ex) { - throw new AccessGrantException( - "Unexpected I/O exception while processing Access Grant query", ex); + .POST(Request.BodyPublishers.ofByteArray(serialize(data))).build(); + final Response response = client.send(req, Response.BodyHandlers.ofInputStream()) + .toCompletableFuture().join(); + + try (final InputStream input = response.body()) { + final int status = response.statusCode(); + if (isSuccess(status)) { + responses.addAll(processQueryResponse(input, supportedTypes, clazz)); } - }).flatMap(List::stream).collect(Collectors.toList())); + } catch (final IOException ex) { + throw new AccessGrantException( + "Unexpected I/O exception while processing Access Grant query", ex); + } + } + return responses; }); } diff --git a/access-grant/src/site/site.xml b/access-grant/src/site/site.xml index cd7c727aa68..4e08bdd2434 100644 --- a/access-grant/src/site/site.xml +++ b/access-grant/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/api/pom.xml b/api/pom.xml index 3b5e8225e0c..89bbf57418e 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-api diff --git a/api/src/site/site.xml b/api/src/site/site.xml index c3b68769338..d09cbb4a5dc 100644 --- a/api/src/site/site.xml +++ b/api/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/archetypes/java/pom.xml b/archetypes/java/pom.xml index b93bb9f0a96..13f783bec0b 100644 --- a/archetypes/java/pom.xml +++ b/archetypes/java/pom.xml @@ -3,7 +3,7 @@ com.inrupt.client inrupt-client-archetype-parent - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-archetype-java diff --git a/archetypes/pom.xml b/archetypes/pom.xml index 8cddc2130de..3d8b64f7809 100644 --- a/archetypes/pom.xml +++ b/archetypes/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-archetype-parent @@ -17,4 +17,16 @@ java + + + + + org.owasp + dependency-check-maven + + true + + + + diff --git a/bom/pom.xml b/bom/pom.xml index cec62c1186f..d1933e04229 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -5,7 +5,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT .. diff --git a/bom/src/site/site.xml b/bom/src/site/site.xml index 86cb644d20e..373c6f66a23 100644 --- a/bom/src/site/site.xml +++ b/bom/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/build-tools/owasp/suppressions.xml b/build-tools/owasp/suppressions.xml index 20672bdc750..4330c57685d 100644 --- a/build-tools/owasp/suppressions.xml +++ b/build-tools/owasp/suppressions.xml @@ -10,20 +10,26 @@ - + - ^pkg:maven/org\.eclipse\.jetty\.http2/http2\-.*@.*$ - CVE-2023-44487 + ^pkg:javascript/DOMPurify@.*$ + CVE-2024-45801 + CVE-2024-47875 - + - ^pkg:maven/org\.eclipse\.jetty/jetty\-.*@.*$ - CVE-2023-44487 + ^pkg:maven/org\.eclipse\.jetty/jetty-server@.*$ + CVE-2024-8184 + + + + ^pkg:maven/org\.springframework\..*@.*$ + CVE-2024-38828 diff --git a/caffeine/pom.xml b/caffeine/pom.xml index b970482aaf3..0be7caf6ba6 100644 --- a/caffeine/pom.xml +++ b/caffeine/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-caffeine diff --git a/core/pom.xml b/core/pom.xml index ad18ee3c35d..e4f9c24d656 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-core diff --git a/core/src/site/site.xml b/core/src/site/site.xml index e0110dd5c3d..40f6f0db2ec 100644 --- a/core/src/site/site.xml +++ b/core/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/examples/cli/pom.xml b/examples/cli/pom.xml index e20ef0e48d9..d80cc5deb9a 100644 --- a/examples/cli/pom.xml +++ b/examples/cli/pom.xml @@ -5,11 +5,11 @@ com.inrupt.client inrupt-client-examples-parent - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-examples-cli - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT Inrupt Java Client Libraries - CLI Example Sample CLI application. @@ -19,7 +19,7 @@ 17 17 - 3.6.0 + 3.17.4 diff --git a/examples/cli/src/site/site.xml b/examples/cli/src/site/site.xml index 18e2903fced..c33fcc629b8 100644 --- a/examples/cli/src/site/site.xml +++ b/examples/cli/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/examples/pom.xml b/examples/pom.xml index 696aee1f3f9..1210d21f9fd 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-examples-parent diff --git a/examples/springboot/pom.xml b/examples/springboot/pom.xml index 875e46d0a2f..85ca98b4f5c 100644 --- a/examples/springboot/pom.xml +++ b/examples/springboot/pom.xml @@ -5,11 +5,11 @@ com.inrupt.client inrupt-client-examples-parent - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-examples-springboot - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT Inrupt Java Client Libraries - Spring Boot Example Sample Spring Boot application. @@ -19,7 +19,7 @@ 17 17 3.1.1.RELEASE - 3.2.0 + 3.4.0 diff --git a/examples/springboot/src/site/site.xml b/examples/springboot/src/site/site.xml index a6989ad1caa..8c42c5a3f37 100644 --- a/examples/springboot/src/site/site.xml +++ b/examples/springboot/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/examples/src/site/site.xml b/examples/src/site/site.xml index dc7d8499019..b80ca81c525 100644 --- a/examples/src/site/site.xml +++ b/examples/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/examples/webapp/pom.xml b/examples/webapp/pom.xml index df6b6d59442..d28526bf890 100644 --- a/examples/webapp/pom.xml +++ b/examples/webapp/pom.xml @@ -5,11 +5,11 @@ com.inrupt.client inrupt-client-examples-parent - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-examples-webapp - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT Inrupt Java Client Libraries - Quarkus Example Sample web application. @@ -19,7 +19,7 @@ 17 17 - 3.6.0 + 3.17.4 diff --git a/examples/webapp/src/site/site.xml b/examples/webapp/src/site/site.xml index 20f2a385989..3ba07a7b1dd 100644 --- a/examples/webapp/src/site/site.xml +++ b/examples/webapp/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/gradle/pom.xml b/gradle/pom.xml index 1efc2cec956..3e88319801a 100644 --- a/gradle/pom.xml +++ b/gradle/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-gradle diff --git a/gradle/settings.gradle b/gradle/settings.gradle index 85d6582ce29..d9f1264a0b6 100644 --- a/gradle/settings.gradle +++ b/gradle/settings.gradle @@ -7,7 +7,7 @@ pluginManagement { } plugins { - id "com.gradle.enterprise" version "3.15.1" + id "com.gradle.enterprise" version "3.19" } dependencyResolutionManagement { diff --git a/guava/pom.xml b/guava/pom.xml index fa257d382a4..b6c00ddbc76 100644 --- a/guava/pom.xml +++ b/guava/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-guava diff --git a/httpclient/pom.xml b/httpclient/pom.xml index 059e8403617..82ab032888b 100644 --- a/httpclient/pom.xml +++ b/httpclient/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-httpclient diff --git a/httpclient/src/main/java/com/inrupt/client/httpclient/HttpClientService.java b/httpclient/src/main/java/com/inrupt/client/httpclient/HttpClientService.java index 4818cad9757..976f10055f0 100644 --- a/httpclient/src/main/java/com/inrupt/client/httpclient/HttpClientService.java +++ b/httpclient/src/main/java/com/inrupt/client/httpclient/HttpClientService.java @@ -68,6 +68,7 @@ public CompletionStage> send(final Request request, final Respon .orElseGet(HttpRequest.BodyPublishers::noBody); builder.method(request.method(), publisher); + request.timeout().ifPresent(timeout -> builder.timeout(timeout)); for (final Map.Entry> entry : request.headers().asMap().entrySet()) { for (final String value : entry.getValue()) { diff --git a/httpclient/src/site/site.xml b/httpclient/src/site/site.xml index 80771952b4a..af726a05dcd 100644 --- a/httpclient/src/site/site.xml +++ b/httpclient/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/integration/base/pom.xml b/integration/base/pom.xml index aa3acbd3b64..82cf6ae4d6e 100644 --- a/integration/base/pom.xml +++ b/integration/base/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client-integration-tests - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-integration-base-tests Inrupt Java Client Libraries - Integration Base Tests @@ -14,7 +14,7 @@ 2.1.1 - 3.4.4 + 3.10.2 diff --git a/integration/base/src/main/java/com/inrupt/client/integration/base/AccessGrantScenarios.java b/integration/base/src/main/java/com/inrupt/client/integration/base/AccessGrantScenarios.java index 3869466dc7b..d694312e8e6 100644 --- a/integration/base/src/main/java/com/inrupt/client/integration/base/AccessGrantScenarios.java +++ b/integration/base/src/main/java/com/inrupt/client/integration/base/AccessGrantScenarios.java @@ -97,10 +97,10 @@ public class AccessGrantScenarios { protected static final String GRANT_MODE_READ = "Read"; private static final String GRANT_MODE_APPEND = "Append"; private static final String GRANT_MODE_WRITE = "Write"; - private static final URI PURPOSE1 = URI.create("https://purpose.example/212efdf4-e1a4-4dcd-9d3b-d6eb92e0205f"); - private static final URI PURPOSE2 = URI.create("https://purpose.example/de605b08-76c7-4f04-9cec-a438810b0c03"); - protected static final Set PURPOSES = new HashSet<>(Arrays.asList(PURPOSE1, PURPOSE2)); - protected static final String GRANT_EXPIRATION = Instant.now().plus(1, ChronoUnit.HOURS) + private static URI PURPOSE1; + private static URI PURPOSE2; + protected static final Set PURPOSES = new HashSet<>(); + protected static final String GRANT_EXPIRATION = Instant.now().plus(20, ChronoUnit.MINUTES) .truncatedTo(ChronoUnit.SECONDS).toString(); private static final String sharedTextFileName = "sharedFile.txt"; protected static URI sharedTextFileURI; @@ -111,6 +111,11 @@ public class AccessGrantScenarios { @BeforeAll static void setup() throws IOException { LOGGER.info("Setup AccessGrantScenarios test"); + PURPOSE1 = URI.create("https://purpose.example/" + UUID.randomUUID()); + PURPOSE2 = URI.create("https://purpose.example/" + UUID.randomUUID()); + PURPOSES.clear(); + PURPOSES.add(PURPOSE1); + PURPOSES.add(PURPOSE2); if (config.getOptionalValue("inrupt.test.webid", String.class).isPresent()) { LOGGER.info("Running AccessGrantScenarios on live server"); webidUrl = config.getOptionalValue("inrupt.test.webid", String.class).get(); @@ -177,7 +182,8 @@ static void setup() throws IOException { URI.create(webidUrl), URI.create(requesterWebidUrl), sharedTextFileURI, - authServer.getMockServerUrl() + authServer.getMockServerUrl(), + PURPOSE1 ); accessGrantServer.start(); ACCESS_GRANT_PROVIDER = accessGrantServer.getMockServerUrl(); diff --git a/integration/base/src/main/java/com/inrupt/client/integration/base/DomainModulesResource.java b/integration/base/src/main/java/com/inrupt/client/integration/base/DomainModulesResource.java index 3d1ef8a20c9..51f10cc4b20 100644 --- a/integration/base/src/main/java/com/inrupt/client/integration/base/DomainModulesResource.java +++ b/integration/base/src/main/java/com/inrupt/client/integration/base/DomainModulesResource.java @@ -202,7 +202,7 @@ void containerCreateDeleteTest() { final String containerURL = publicContainerURI + "newContainer-" + UUID.randomUUID() + "/"; - final SolidContainer newContainer = new SolidContainer(URI.create(containerURL), null, null); + final SolidContainer newContainer = new SolidContainer(URI.create(containerURL)); assertDoesNotThrow(() -> client.create(newContainer)); assertDoesNotThrow(() -> client.delete(newContainer)); diff --git a/integration/base/src/main/java/com/inrupt/client/integration/base/MockAccessGrantServer.java b/integration/base/src/main/java/com/inrupt/client/integration/base/MockAccessGrantServer.java index da48de35c37..028ecac610a 100644 --- a/integration/base/src/main/java/com/inrupt/client/integration/base/MockAccessGrantServer.java +++ b/integration/base/src/main/java/com/inrupt/client/integration/base/MockAccessGrantServer.java @@ -60,6 +60,7 @@ class MockAccessGrantServer { private final String ownerWebId; private final String requesterWebId; private final String sharedResource; + private final URI purpose; private final String authorisationServerUrl; @@ -67,12 +68,14 @@ public MockAccessGrantServer( final URI ownerWebId, final URI requesterWebId, final URI sharedResource, - final String authorisationServerUrl + final String authorisationServerUrl, + final URI purpose ) { this.ownerWebId = ownerWebId.toString(); this.requesterWebId = requesterWebId.toString(); this.sharedResource = sharedResource.toString(); this.authorisationServerUrl = authorisationServerUrl; + this.purpose = purpose; wireMockServer = new WireMockServer(WireMockConfiguration.options() .httpDisabled(true) .dynamicHttpsPort()); @@ -227,7 +230,7 @@ private void setupMocks() { .atPriority(1) .withHeader(USER_AGENT_HEADER, equalTo(USER_AGENT)) .withRequestBody(containing("\"Append\"")) - .withRequestBody(containing("\"https://purpose.example/212efdf4-e1a4-4dcd-9d3b-d6eb92e0205f\"")) + .withRequestBody(containing("\"" + purpose + "\"")) .withRequestBody(containing("\"" + this.sharedResource + "\"")) .withRequestBody(containing("SolidAccessGrant")) .willReturn(aResponse() diff --git a/integration/base/src/site/site.xml b/integration/base/src/site/site.xml index 2065e7f4dbc..47e6ca7c914 100644 --- a/integration/base/src/site/site.xml +++ b/integration/base/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/integration/customokhttp/pom.xml b/integration/customokhttp/pom.xml index d28edf30d33..87f1fbde241 100644 --- a/integration/customokhttp/pom.xml +++ b/integration/customokhttp/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client-integration-tests - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-integration-customokhttp @@ -40,7 +40,7 @@ com.squareup.okio okio - 3.6.0 + 3.9.1 diff --git a/integration/customokhttp/src/main/java/com/inrupt/client/integration/customokhttp/CustomOkHttpService.java b/integration/customokhttp/src/main/java/com/inrupt/client/integration/customokhttp/CustomOkHttpService.java index 572cc1998bc..714a6e3123d 100644 --- a/integration/customokhttp/src/main/java/com/inrupt/client/integration/customokhttp/CustomOkHttpService.java +++ b/integration/customokhttp/src/main/java/com/inrupt/client/integration/customokhttp/CustomOkHttpService.java @@ -29,6 +29,7 @@ import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import java.security.cert.X509Certificate; +import java.time.Duration; import java.util.Arrays; import java.util.HashSet; import java.util.List; @@ -191,6 +192,7 @@ public X509Certificate[] getAcceptedIssuers() { final OkHttpClient.Builder newBuilder = new OkHttpClient.Builder(); newBuilder.sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustAllCerts[0]); newBuilder.hostnameVerifier((hostname, session) -> true); + newBuilder.callTimeout(Duration.ofSeconds(30)); return newBuilder.build(); } diff --git a/integration/openid/pom.xml b/integration/openid/pom.xml index d1b91a49284..4f22ea3143a 100644 --- a/integration/openid/pom.xml +++ b/integration/openid/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client-integration-tests - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-integration-openid-tests diff --git a/integration/openid/src/site/site.xml b/integration/openid/src/site/site.xml index 1d4cfb39518..bbb4982f3ce 100644 --- a/integration/openid/src/site/site.xml +++ b/integration/openid/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/integration/pom.xml b/integration/pom.xml index 464c324dfc8..97ecca2393e 100644 --- a/integration/pom.xml +++ b/integration/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-integration-tests diff --git a/integration/src/site/site.xml b/integration/src/site/site.xml index bbae83f8248..55f7825a037 100644 --- a/integration/src/site/site.xml +++ b/integration/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/integration/uma/pom.xml b/integration/uma/pom.xml index b69f0142c32..723501a7724 100644 --- a/integration/uma/pom.xml +++ b/integration/uma/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client-integration-tests - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-integration-uma-tests diff --git a/integration/uma/src/site/site.xml b/integration/uma/src/site/site.xml index 2e7996bc7ce..a5ef709f4e2 100644 --- a/integration/uma/src/site/site.xml +++ b/integration/uma/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/jackson/pom.xml b/jackson/pom.xml index b96594bbf92..5de2c0adb44 100644 --- a/jackson/pom.xml +++ b/jackson/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-jackson diff --git a/jackson/src/site/site.xml b/jackson/src/site/site.xml index fd45de0ae89..5da0b2c7a75 100644 --- a/jackson/src/site/site.xml +++ b/jackson/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/jena/pom.xml b/jena/pom.xml index 5d009553793..b9fb42dbe22 100644 --- a/jena/pom.xml +++ b/jena/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-jena diff --git a/jena/src/site/site.xml b/jena/src/site/site.xml index 839332d8a2b..a12bfaab340 100644 --- a/jena/src/site/site.xml +++ b/jena/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/jsonb/pom.xml b/jsonb/pom.xml index 2a49fed1f24..54e1300d6e6 100644 --- a/jsonb/pom.xml +++ b/jsonb/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-jsonb diff --git a/jsonb/src/site/site.xml b/jsonb/src/site/site.xml index 7ef33e4495b..1ed74045d47 100644 --- a/jsonb/src/site/site.xml +++ b/jsonb/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/okhttp/pom.xml b/okhttp/pom.xml index 9e4104d95ed..e24059cfd7d 100644 --- a/okhttp/pom.xml +++ b/okhttp/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-okhttp @@ -40,7 +40,7 @@ com.squareup.okio okio - 3.6.0 + 3.9.1 diff --git a/okhttp/src/main/java/com/inrupt/client/okhttp/OkHttpService.java b/okhttp/src/main/java/com/inrupt/client/okhttp/OkHttpService.java index 411fb740901..3346de7973f 100644 --- a/okhttp/src/main/java/com/inrupt/client/okhttp/OkHttpService.java +++ b/okhttp/src/main/java/com/inrupt/client/okhttp/OkHttpService.java @@ -25,6 +25,7 @@ import com.inrupt.client.spi.HttpService; import java.io.IOException; +import java.time.Duration; import java.util.Arrays; import java.util.HashSet; import java.util.List; @@ -58,7 +59,7 @@ public class OkHttpService implements HttpService { * Create an HTTP client service with a default {@link OkHttpClient}. */ public OkHttpService() { - this(new OkHttpClient()); + this(new OkHttpClient().newBuilder().callTimeout(Duration.ofSeconds(30)).build()); } private OkHttpService(final OkHttpClient client) { @@ -76,7 +77,7 @@ public CompletionStage> send(final Request request, final Respon LOGGER.trace("Request Headers: {}", req.headers()); } } - client.newCall(req).enqueue(new Callback() { + getClient(request).newCall(req).enqueue(new Callback() { @Override public void onResponse(final Call call, final okhttp3.Response res) throws IOException { if (LOGGER.isDebugEnabled()) { @@ -112,6 +113,14 @@ public static OkHttpService ofOkHttpClient(final OkHttpClient client) { return new OkHttpService(client); } + OkHttpClient getClient(final Request request) { + if (request.timeout().isPresent()) { + return client.newBuilder().readTimeout(request.timeout().get()) + .writeTimeout(request.timeout().get()).build(); + } + return client; + } + static RequestBody prepareBody(final Request request, final MediaType mediaType) { if (NO_BODY_METHODS.contains(request.method())) { return null; diff --git a/okhttp/src/site/site.xml b/okhttp/src/site/site.xml index 24627183214..69455be002f 100644 --- a/okhttp/src/site/site.xml +++ b/okhttp/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/openid/pom.xml b/openid/pom.xml index d092c97ff38..d68896da935 100644 --- a/openid/pom.xml +++ b/openid/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-openid diff --git a/openid/src/main/java/com/inrupt/client/openid/OpenIdProvider.java b/openid/src/main/java/com/inrupt/client/openid/OpenIdProvider.java index c71e9fafcd3..c50b835bfd8 100644 --- a/openid/src/main/java/com/inrupt/client/openid/OpenIdProvider.java +++ b/openid/src/main/java/com/inrupt/client/openid/OpenIdProvider.java @@ -54,8 +54,16 @@ */ public class OpenIdProvider { + // OAuth 2 and OpenID request parameters private static final String CLIENT_ID = "client_id"; + private static final String CODE_CHALLENGE = "code_challenge"; + private static final String CODE_CHALLENGE_METHOD = "code_challenge_method"; + private static final String NONCE = "nonce"; private static final String REDIRECT_URI = "redirect_uri"; + private static final String RESPONSE_TYPE = "response_type"; + private static final String SCOPE = "scope"; + private static final String STATE = "state"; + private static final String EQUALS = "="; private static final String ETC = "&"; @@ -155,11 +163,20 @@ private URI authorize(final URI authorizationEndpoint, final AuthorizationReques final URIBuilder builder = URIBuilder.newBuilder(authorizationEndpoint) .queryParam(CLIENT_ID, request.getClientId()) .queryParam(REDIRECT_URI, request.getRedirectUri().toString()) - .queryParam("response_type", request.getResponseType()); + .queryParam(RESPONSE_TYPE, request.getResponseType()) + .queryParam(SCOPE, request.getScope()); + + if (request.getState() != null) { + builder.queryParam(STATE, request.getState()); + } + + if (request.getNonce() != null) { + builder.queryParam(NONCE, request.getNonce()); + } if (request.getCodeChallenge() != null && request.getCodeChallengeMethod() != null) { - builder.queryParam("code_challenge", request.getCodeChallenge()); - builder.queryParam("code_challenge_method", request.getCodeChallengeMethod()); + builder.queryParam(CODE_CHALLENGE, request.getCodeChallenge()); + builder.queryParam(CODE_CHALLENGE_METHOD, request.getCodeChallengeMethod()); } return builder.build(); diff --git a/openid/src/site/site.xml b/openid/src/site/site.xml index 96d728144d1..ba29346d524 100644 --- a/openid/src/site/site.xml +++ b/openid/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/openid/src/test/java/com/inrupt/client/openid/OpenIdProviderTest.java b/openid/src/test/java/com/inrupt/client/openid/OpenIdProviderTest.java index 2b1827b8493..b4bf2b9f2e5 100644 --- a/openid/src/test/java/com/inrupt/client/openid/OpenIdProviderTest.java +++ b/openid/src/test/java/com/inrupt/client/openid/OpenIdProviderTest.java @@ -83,6 +83,8 @@ void unknownMetadata() { @Test void authorizeAsyncTest() { final AuthorizationRequest authReq = AuthorizationRequest.newBuilder() + .scope("openid") + .scope("webid") .codeChallenge("myCodeChallenge") .codeChallengeMethod("method") .build( @@ -91,7 +93,27 @@ void authorizeAsyncTest() { ); assertEquals( "http://example.test/auth?client_id=myClientId&redirect_uri=myRedirectUri&" + - "response_type=code&code_challenge=myCodeChallenge&code_challenge_method=method", + "response_type=code&scope=openid%20webid&code_challenge=myCodeChallenge&code_challenge_method=method", + openIdProvider.authorize(authReq).toCompletableFuture().join().toString() + ); + } + + @Test + void authorizeAsyncStateNonceTest() { + final String state = UUID.randomUUID().toString(); + final String nonce = UUID.randomUUID().toString(); + final AuthorizationRequest authReq = AuthorizationRequest.newBuilder() + .scope("openid") + .scope("webid") + .state(state) + .nonce(nonce) + .build( + "myClientId", + URI.create("myRedirectUri") + ); + assertEquals( + "http://example.test/auth?client_id=myClientId&redirect_uri=myRedirectUri&" + + "response_type=code&scope=openid%20webid&state=" + state + "&nonce=" + nonce, openIdProvider.authorize(authReq).toCompletableFuture().join().toString() ); } diff --git a/parser/pom.xml b/parser/pom.xml index a1e4f6946cf..513232744b1 100644 --- a/parser/pom.xml +++ b/parser/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-parser diff --git a/parser/src/site/site.xml b/parser/src/site/site.xml index 4e77c763e6c..0959c5d56e7 100644 --- a/parser/src/site/site.xml +++ b/parser/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/performance/base/pom.xml b/performance/base/pom.xml index 92082c6acbc..d0ebf48c94d 100644 --- a/performance/base/pom.xml +++ b/performance/base/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client-performance-tests - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-performance-base-tests Inrupt Java Client Libraries - Performance Base Tests @@ -14,7 +14,7 @@ 2.1.1 - 3.4.4 + 3.10.2 diff --git a/performance/base/src/site/site.xml b/performance/base/src/site/site.xml index 97788bf6322..fb09ed709be 100644 --- a/performance/base/src/site/site.xml +++ b/performance/base/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/performance/pom.xml b/performance/pom.xml index 0927f57492b..7408dd644a2 100644 --- a/performance/pom.xml +++ b/performance/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-performance-tests diff --git a/performance/src/site/site.xml b/performance/src/site/site.xml index 054d92355a1..7822737836a 100644 --- a/performance/src/site/site.xml +++ b/performance/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/performance/uma/pom.xml b/performance/uma/pom.xml index 6796cd3cdff..5bcd6cae1a6 100644 --- a/performance/uma/pom.xml +++ b/performance/uma/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client-performance-tests - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-performance-uma-tests diff --git a/performance/uma/src/site/site.xml b/performance/uma/src/site/site.xml index d4a0cd965ab..1d7c2084357 100644 --- a/performance/uma/src/site/site.xml +++ b/performance/uma/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/pom.xml b/pom.xml index 58d331b8845..272a85b1dad 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT Inrupt Java Client Libraries https://docs.inrupt.com/developer-tools/java/client-libraries/ @@ -20,69 +20,72 @@ UTF-8 - 4.13.1 + 4.13.2 3.1.8 - 1.16.0 - 1.6.0 - 2.15.0 + 1.17.1 + 1.9.0 + 2.18.0 0.5.0 - 32.1.3-jre - 2.16.0 + 33.3.1-jre + 2.18.2 2.1.3 4.10.0 - 0.9.3 - 3.0.0 + 0.9.6 + 3.0.1 4.12.0 - 3.6.0 - 2.0.9 - 6.1.5 + 3.17.4 + 2.0.16 + + 5.8.14 0.6.0 - 1.0.0 + 1.1.1 3.1.0 - 3.2.1 - 3.6.0 - 3.3.1 - 3.3.2 - 3.11.0 - 3.6.1 - 3.1.1 - 3.4.1 - 3.1.1 - 3.1.1 - 3.1.0 - 0.8.11 - 3.3.0 - 3.6.2 - 4.3 - 1.6.13 - 8.4.2 - 3.4.5 - 3.21.2 - 3.12.1 - 3.0.1 + 3.3.1 + 3.7.1 + 3.6.0 + 3.4.0 + 3.13.0 + 3.8.1 + 3.1.3 + 3.5.0 + 3.5.0 + 3.1.3 + 3.2.7 + 0.8.12 + 3.4.2 + 3.11.2 + 4.6 + 1.7.0 + 11.1.1 + 3.8.0 + 3.26.0 + 3.21.0 + 3.1.1 3.3.1 - 3.10.0.2594 - 3.3.0 - 3.2.2 + 5.0.0.4389 + 3.3.1 + 3.5.2 - 10.12.4 + 10.21.0 - 4.2.0 - 3.15.3 + 4.2.2 + 3.17.5 2.0.1 - 5.10.1 - 4.3.1 - 3.4.4 - 3.0.3 - 3.3.1 + 5.11.4 + 4.6.1 + 3.10.2 + 3.0.4 + 3.10.0 true true + + ${maven.multiModuleProjectDirectory}/reports/target/site/jacoco-merged/jacoco.xml @@ -106,7 +109,6 @@ okhttp openid parser - quarkus rdf4j rdf-legacy solid @@ -118,7 +120,6 @@ spring integration performance - reports archetypes @@ -146,6 +147,24 @@ guava ${guava.version} + + + org.apache.commons + commons-compress + 1.27.1 + + + + org.xmlunit + xmlunit-core + 2.10.0 + + + + com.google.protobuf + protobuf-java + 3.25.5 + @@ -261,9 +280,9 @@ enforce - - - + + + @@ -275,7 +294,7 @@ org.codehaus.mojo extra-enforcer-rules - 1.7.0 + 1.9.0 @@ -625,6 +644,8 @@ ./build-tools/owasp/suppressions.xml + ${nvd.api.key} + ${nvd.api.datafeed} @@ -746,6 +767,16 @@ + + java-17 + + [17,) + + + quarkus + reports + + publish diff --git a/quarkus/pom.xml b/quarkus/pom.xml index dedb1ddf4b8..857071d2801 100644 --- a/quarkus/pom.xml +++ b/quarkus/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-quarkus @@ -20,6 +20,13 @@ + + org.junit + junit-bom + ${junit.version} + pom + import + io.quarkus quarkus-bom @@ -57,13 +64,11 @@ org.junit.jupiter junit-jupiter-engine - ${junit.version} test org.junit.jupiter junit-jupiter-api - ${junit.version} test diff --git a/quarkus/src/main/java/com/inrupt/client/quarkus/SessionUtils.java b/quarkus/src/main/java/com/inrupt/client/quarkus/SessionUtils.java index fd646dfed69..0f49984f25b 100644 --- a/quarkus/src/main/java/com/inrupt/client/quarkus/SessionUtils.java +++ b/quarkus/src/main/java/com/inrupt/client/quarkus/SessionUtils.java @@ -28,6 +28,10 @@ import org.eclipse.microprofile.jwt.JsonWebToken; +/** + * A utility class for converting a Quarkus (Microprofile) {@link JsonWebToken} to session objects + * for use with the Java Client libraries. + */ public final class SessionUtils { /** diff --git a/quarkus/src/main/java/com/inrupt/client/quarkus/package-info.java b/quarkus/src/main/java/com/inrupt/client/quarkus/package-info.java new file mode 100644 index 00000000000..825ce37efb8 --- /dev/null +++ b/quarkus/src/main/java/com/inrupt/client/quarkus/package-info.java @@ -0,0 +1,31 @@ +/* + * Copyright Inrupt Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the + * Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +/** + *

Integration tooling for Quarkus applications.

+ * + *

When integrating with Quarkus applications, one can convert a Microprofile JsonWebToken into a Session object: + * + *

{@code
+    Optional session = SessionUtils.asSession(jwt);
+    }
+ * 
+ */ +package com.inrupt.client.quarkus; diff --git a/quarkus/src/test/java/com/inrupt/client/quarkus/SessionUtilsTest.java b/quarkus/src/test/java/com/inrupt/client/quarkus/SessionUtilsTest.java index f8d8c2e22e5..253155aa1a6 100644 --- a/quarkus/src/test/java/com/inrupt/client/quarkus/SessionUtilsTest.java +++ b/quarkus/src/test/java/com/inrupt/client/quarkus/SessionUtilsTest.java @@ -36,6 +36,7 @@ import java.net.URI; import java.time.Instant; import java.util.Optional; +import java.util.Set; import org.eclipse.microprofile.jwt.JsonWebToken; import org.jose4j.jwk.PublicJsonWebKey; @@ -81,7 +82,7 @@ static JsonWebToken generateIdToken(final String sub, final String issuer, final .newPublicJwk(ResourceUtils.readResource("testKey.json")); final var authContext = new JWTAuthContextInfo(jwk.getPublicKey(), issuer); - authContext.setSignatureAlgorithm(SignatureAlgorithm.ES256); + authContext.setSignatureAlgorithm(Set.of(SignatureAlgorithm.ES256)); final var parser = new DefaultJWTParser(authContext); final var token = Jwt.claims() diff --git a/rdf-legacy/pom.xml b/rdf-legacy/pom.xml index e437d6e9e0c..5d107be4f6c 100644 --- a/rdf-legacy/pom.xml +++ b/rdf-legacy/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-rdf-legacy @@ -18,7 +18,7 @@ 1.8 - 1.11.0 + 1.13.0 3.7.7 @@ -48,6 +48,12 @@ pom import
+ + + commons-io + commons-io + ${commons.io.version} +
diff --git a/rdf-legacy/src/site/site.xml b/rdf-legacy/src/site/site.xml index 8a700326611..7339e95160d 100644 --- a/rdf-legacy/src/site/site.xml +++ b/rdf-legacy/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/rdf4j/pom.xml b/rdf4j/pom.xml index 0f551f4599c..bbec2452a6e 100644 --- a/rdf4j/pom.xml +++ b/rdf4j/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-rdf4j @@ -16,7 +16,7 @@ 1.8 1.8 - 4.3.8 + 5.1.0 @@ -44,6 +44,12 @@ pom import + + + commons-io + commons-io + ${commons.io.version} + diff --git a/rdf4j/src/site/site.xml b/rdf4j/src/site/site.xml index 1fc408f274b..37b4c289e80 100644 --- a/rdf4j/src/site/site.xml +++ b/rdf4j/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/reports/pom.xml b/reports/pom.xml index 54d30cd18fc..4bc79b2efd2 100644 --- a/reports/pom.xml +++ b/reports/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-report diff --git a/runtime/pom.xml b/runtime/pom.xml index 67ed9e4574e..6d059d62d85 100644 --- a/runtime/pom.xml +++ b/runtime/pom.xml @@ -5,7 +5,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT .. diff --git a/solid/pom.xml b/solid/pom.xml index dc38052edbb..10a280377fa 100644 --- a/solid/pom.xml +++ b/solid/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-solid diff --git a/solid/src/main/java/com/inrupt/client/solid/SolidContainer.java b/solid/src/main/java/com/inrupt/client/solid/SolidContainer.java index b2c53765eeb..ac2ff46ce8e 100644 --- a/solid/src/main/java/com/inrupt/client/solid/SolidContainer.java +++ b/solid/src/main/java/com/inrupt/client/solid/SolidContainer.java @@ -20,6 +20,7 @@ */ package com.inrupt.client.solid; +import com.inrupt.client.Headers; import com.inrupt.client.ValidationResult; import com.inrupt.client.vocabulary.LDP; import com.inrupt.client.vocabulary.RDF; @@ -62,7 +63,7 @@ public SolidContainer(final URI identifier) { * @param dataset the dataset for this container, may be {@code null} */ public SolidContainer(final URI identifier, final Dataset dataset) { - this(identifier, dataset, null); + this(identifier, dataset, (Headers) null); } /** @@ -71,11 +72,24 @@ public SolidContainer(final URI identifier, final Dataset dataset) { * @param identifier the container's unique identifier * @param dataset the dataset for this container, may be {@code null} * @param metadata the container's metadata, may be {@code null} + * @deprecated use {@link #SolidContainer(URI, Dataset, Headers)} instead */ + @Deprecated public SolidContainer(final URI identifier, final Dataset dataset, final Metadata metadata) { super(identifier, dataset, metadata); } + /** + * Create a new SolidContainer. + * + * @param identifier the container's unique identifier + * @param dataset the dataset for this container, may be {@code null} + * @param headers headers associated with this resource, may be {@code null} + */ + public SolidContainer(final URI identifier, final Dataset dataset, final Headers headers) { + super(identifier, dataset, headers); + } + /** * Get an immutable collection of resources contained in this SolidContainer. * diff --git a/solid/src/site/site.xml b/solid/src/site/site.xml index 9004a2cf3ff..60ed0bbc156 100644 --- a/solid/src/site/site.xml +++ b/solid/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/solid/src/test/java/com/inrupt/client/solid/SolidClientTest.java b/solid/src/test/java/com/inrupt/client/solid/SolidClientTest.java index 20224a02a9e..fab400019f5 100644 --- a/solid/src/test/java/com/inrupt/client/solid/SolidClientTest.java +++ b/solid/src/test/java/com/inrupt/client/solid/SolidClientTest.java @@ -183,6 +183,13 @@ void testGetContainer() throws IOException, InterruptedException { assertEquals(2, c.stream(Optional.empty(), rdf.createIRI(uri.toString()), rdf.createIRI("https://example.com/song"), null).count()); + assertEquals(Optional.of("user=\"read write\",public=\"read\""), + c.getHeaders().firstValue("WAC-Allow")); + assertEquals(Optional.of("user=\"read write\",public=\"read\""), + c.getHeaders().firstValue("wac-allow")); + assertTrue(c.getHeaders().allValues("Link") + .contains("; rel=\"" + PIM.storage + "\"")); + assertDoesNotThrow(client.update(c).toCompletableFuture()::join); assertDoesNotThrow(client.create(c).toCompletableFuture()::join); assertDoesNotThrow(client.delete(c).toCompletableFuture()::join); @@ -378,7 +385,7 @@ void testSpecialisedExceptions( ) { final Headers headers = Headers.of(Collections.singletonMap("x-key", Arrays.asList("value"))); final SolidClient solidClient = new SolidClient(ClientProvider.getClient(), headers, false); - final SolidContainer resource = new SolidContainer(URI.create("http://example.com"), null, null); + final SolidContainer resource = new SolidContainer(URI.create("http://example.com")); final SolidClientException exception = assertThrows( clazz, diff --git a/spring/pom.xml b/spring/pom.xml index 00377d576b9..fe9bcbe56e0 100644 --- a/spring/pom.xml +++ b/spring/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-spring @@ -18,6 +18,18 @@ 11 + + + + org.springframework.security + spring-security-bom + ${spring.security.version} + pom + import + + + + com.inrupt.client @@ -32,7 +44,6 @@ org.springframework.security spring-security-oauth2-core - ${spring.security.version} provided @@ -64,7 +75,6 @@ org.springframework.security spring-security-test - ${spring.security.version} test @@ -85,16 +95,24 @@ ${glassfish.json.version} test + + + + org.springframework + spring-web + 6.2.1 + provided + - java-11 + java-17 - [,17) + [17,) - 5.8.8 + 6.4.1 diff --git a/spring/src/main/java/com/inrupt/client/spring/package-info.java b/spring/src/main/java/com/inrupt/client/spring/package-info.java new file mode 100644 index 00000000000..85ac3220525 --- /dev/null +++ b/spring/src/main/java/com/inrupt/client/spring/package-info.java @@ -0,0 +1,31 @@ +/* + * Copyright Inrupt Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the + * Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +/** + *

Integration tooling for Spring applications.

+ * + *

When integrating with Spring applications, one can convert an OAuth2User into a Session object: + * + *

{@code
+    Optional session = SessionUtils.asSession(user);
+    }
+ * 
+ */ +package com.inrupt.client.spring; diff --git a/src/site/site.xml b/src/site/site.xml index 91f90eb39b3..f725f39a13a 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - index.html + + @@ -21,4 +19,4 @@ 1.11.1 - + diff --git a/test/pom.xml b/test/pom.xml index 566e3ad1c92..202626cdf02 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-test diff --git a/test/src/site/site.xml b/test/src/site/site.xml index 22e78304832..b68ba31c85f 100644 --- a/test/src/site/site.xml +++ b/test/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/uma/pom.xml b/uma/pom.xml index 552ba13f65f..15ebad3bce4 100644 --- a/uma/pom.xml +++ b/uma/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-uma diff --git a/uma/src/site/site.xml b/uma/src/site/site.xml index f8fcc94121d..1d29911e3f6 100644 --- a/uma/src/site/site.xml +++ b/uma/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/vocabulary/pom.xml b/vocabulary/pom.xml index 164a3ed76ed..1dd3ef150c9 100644 --- a/vocabulary/pom.xml +++ b/vocabulary/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-vocabulary diff --git a/vocabulary/src/site/site.xml b/vocabulary/src/site/site.xml index 35df9cd2fa8..8283f52c2e7 100644 --- a/vocabulary/src/site/site.xml +++ b/vocabulary/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - + diff --git a/webid/pom.xml b/webid/pom.xml index 91b5c604bad..34b22db8f36 100644 --- a/webid/pom.xml +++ b/webid/pom.xml @@ -4,7 +4,7 @@ com.inrupt.client inrupt-client - 1.1.0-SNAPSHOT + 1.1.2-SNAPSHOT inrupt-client-webid diff --git a/webid/src/site/site.xml b/webid/src/site/site.xml index 643f2337e8b..7319434ab2f 100644 --- a/webid/src/site/site.xml +++ b/webid/src/site/site.xml @@ -1,9 +1,7 @@ - + - - Inrupt - images/inrupt_logo-2020.svg - https://inrupt.com + + @@ -13,4 +11,4 @@ - +