diff --git a/auth/basic/build.gradle b/auth/basic/build.gradle index ffc39aec..62e79c1a 100644 --- a/auth/basic/build.gradle +++ b/auth/basic/build.gradle @@ -23,7 +23,7 @@ dependencies { testRuntimeOnly "jakarta.activation:jakarta.activation-api:$activationApiVersion" testImplementation "ch.qos.logback:logback-classic:$logbackVersion" - testImplementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" testImplementation "org.glassfish.jersey.core:jersey-server:$jerseyVersion" testImplementation "org.mockito:mockito-core:$mockitoVersion" } diff --git a/auth/basic/src/main/java/module-info.java b/auth/basic/src/main/java/module-info.java index 8644129c..3eb71c44 100644 --- a/auth/basic/src/main/java/module-info.java +++ b/auth/basic/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,7 +16,7 @@ module org.trellisldp.auth.basic { exports org.trellisldp.auth.basic; - requires jakarta.inject.api; + requires jakarta.inject; requires java.ws.rs; requires java.xml.bind; requires java.annotation; diff --git a/auth/basic/src/main/java/org/trellisldp/auth/basic/BasicAuthFilter.java b/auth/basic/src/main/java/org/trellisldp/auth/basic/BasicAuthFilter.java index fa07b0f2..7bc97adc 100644 --- a/auth/basic/src/main/java/org/trellisldp/auth/basic/BasicAuthFilter.java +++ b/auth/basic/src/main/java/org/trellisldp/auth/basic/BasicAuthFilter.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/basic/src/main/java/org/trellisldp/auth/basic/BasicAuthUtils.java b/auth/basic/src/main/java/org/trellisldp/auth/basic/BasicAuthUtils.java index 69aa8c4c..83fc5848 100644 --- a/auth/basic/src/main/java/org/trellisldp/auth/basic/BasicAuthUtils.java +++ b/auth/basic/src/main/java/org/trellisldp/auth/basic/BasicAuthUtils.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/basic/src/main/java/org/trellisldp/auth/basic/BasicPrincipal.java b/auth/basic/src/main/java/org/trellisldp/auth/basic/BasicPrincipal.java index e81cc72d..ce31f1de 100644 --- a/auth/basic/src/main/java/org/trellisldp/auth/basic/BasicPrincipal.java +++ b/auth/basic/src/main/java/org/trellisldp/auth/basic/BasicPrincipal.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/basic/src/main/java/org/trellisldp/auth/basic/Credentials.java b/auth/basic/src/main/java/org/trellisldp/auth/basic/Credentials.java index 85bd12a2..af7f87a1 100644 --- a/auth/basic/src/main/java/org/trellisldp/auth/basic/Credentials.java +++ b/auth/basic/src/main/java/org/trellisldp/auth/basic/Credentials.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/basic/src/main/java/org/trellisldp/auth/basic/package-info.java b/auth/basic/src/main/java/org/trellisldp/auth/basic/package-info.java index 85a3d2ed..639638c6 100644 --- a/auth/basic/src/main/java/org/trellisldp/auth/basic/package-info.java +++ b/auth/basic/src/main/java/org/trellisldp/auth/basic/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/basic/src/test/java/org/trellisldp/auth/basic/BasicAuthFilterTest.java b/auth/basic/src/test/java/org/trellisldp/auth/basic/BasicAuthFilterTest.java index ea556a84..a32afb37 100644 --- a/auth/basic/src/test/java/org/trellisldp/auth/basic/BasicAuthFilterTest.java +++ b/auth/basic/src/test/java/org/trellisldp/auth/basic/BasicAuthFilterTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/basic/src/test/java/org/trellisldp/auth/basic/BasicAuthUtilsTest.java b/auth/basic/src/test/java/org/trellisldp/auth/basic/BasicAuthUtilsTest.java index 212086b6..7e2d0b6d 100644 --- a/auth/basic/src/test/java/org/trellisldp/auth/basic/BasicAuthUtilsTest.java +++ b/auth/basic/src/test/java/org/trellisldp/auth/basic/BasicAuthUtilsTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/basic/src/test/java/org/trellisldp/auth/basic/BasicPrincipalTest.java b/auth/basic/src/test/java/org/trellisldp/auth/basic/BasicPrincipalTest.java index 6b5f8629..9576a158 100644 --- a/auth/basic/src/test/java/org/trellisldp/auth/basic/BasicPrincipalTest.java +++ b/auth/basic/src/test/java/org/trellisldp/auth/basic/BasicPrincipalTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/jwt/build.gradle b/auth/jwt/build.gradle index b983af1e..cdeb75f4 100644 --- a/auth/jwt/build.gradle +++ b/auth/jwt/build.gradle @@ -21,7 +21,7 @@ dependencies { implementation "org.slf4j:slf4j-api:$slf4jVersion" implementation "org.eclipse.microprofile.config:microprofile-config-api:$microprofileConfigVersion" - testImplementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" testImplementation "io.smallrye:smallrye-jwt:$smallryeJwtVersion" testImplementation "jakarta.json.bind:jakarta.json.bind-api:$jsonbApiVersion" testImplementation "org.eclipse:yasson:$yassonVersion" diff --git a/auth/jwt/src/main/java/module-info.java b/auth/jwt/src/main/java/module-info.java index 597e458e..a782afce 100644 --- a/auth/jwt/src/main/java/module-info.java +++ b/auth/jwt/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,7 +16,7 @@ module org.trellisldp.auth.jwt { exports org.trellisldp.auth.jwt; - requires jakarta.inject.api; + requires jakarta.inject; requires java.ws.rs; requires java.annotation; requires microprofile.config.api; diff --git a/auth/jwt/src/main/java/org/trellisldp/auth/jwt/JwtAuthFilter.java b/auth/jwt/src/main/java/org/trellisldp/auth/jwt/JwtAuthFilter.java index 9188cad4..24bd4436 100644 --- a/auth/jwt/src/main/java/org/trellisldp/auth/jwt/JwtAuthFilter.java +++ b/auth/jwt/src/main/java/org/trellisldp/auth/jwt/JwtAuthFilter.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/jwt/src/main/java/org/trellisldp/auth/jwt/WebIdPrincipal.java b/auth/jwt/src/main/java/org/trellisldp/auth/jwt/WebIdPrincipal.java index ef178c65..4a976b64 100644 --- a/auth/jwt/src/main/java/org/trellisldp/auth/jwt/WebIdPrincipal.java +++ b/auth/jwt/src/main/java/org/trellisldp/auth/jwt/WebIdPrincipal.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/jwt/src/main/java/org/trellisldp/auth/jwt/WebIdSecurityContext.java b/auth/jwt/src/main/java/org/trellisldp/auth/jwt/WebIdSecurityContext.java index b0eba1a1..96f44691 100644 --- a/auth/jwt/src/main/java/org/trellisldp/auth/jwt/WebIdSecurityContext.java +++ b/auth/jwt/src/main/java/org/trellisldp/auth/jwt/WebIdSecurityContext.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/jwt/src/main/java/org/trellisldp/auth/jwt/package-info.java b/auth/jwt/src/main/java/org/trellisldp/auth/jwt/package-info.java index a5218740..cc836194 100644 --- a/auth/jwt/src/main/java/org/trellisldp/auth/jwt/package-info.java +++ b/auth/jwt/src/main/java/org/trellisldp/auth/jwt/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/jwt/src/test/java/org/trellisldp/auth/jwt/JwtAuthFilterTest.java b/auth/jwt/src/test/java/org/trellisldp/auth/jwt/JwtAuthFilterTest.java index 8997e838..7aea262d 100644 --- a/auth/jwt/src/test/java/org/trellisldp/auth/jwt/JwtAuthFilterTest.java +++ b/auth/jwt/src/test/java/org/trellisldp/auth/jwt/JwtAuthFilterTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/jwt/src/test/java/org/trellisldp/auth/jwt/WebIdPrincipalTest.java b/auth/jwt/src/test/java/org/trellisldp/auth/jwt/WebIdPrincipalTest.java index 6646466d..d7c4eb5f 100644 --- a/auth/jwt/src/test/java/org/trellisldp/auth/jwt/WebIdPrincipalTest.java +++ b/auth/jwt/src/test/java/org/trellisldp/auth/jwt/WebIdPrincipalTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/jwt/src/test/java/org/trellisldp/auth/jwt/WebIdSecurityContextTest.java b/auth/jwt/src/test/java/org/trellisldp/auth/jwt/WebIdSecurityContextTest.java index e181b71d..34120b9e 100644 --- a/auth/jwt/src/test/java/org/trellisldp/auth/jwt/WebIdSecurityContextTest.java +++ b/auth/jwt/src/test/java/org/trellisldp/auth/jwt/WebIdSecurityContextTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/oauth/build.gradle b/auth/oauth/build.gradle index 479c25e6..34711525 100644 --- a/auth/oauth/build.gradle +++ b/auth/oauth/build.gradle @@ -15,6 +15,7 @@ dependencies { api "jakarta.inject:jakarta.inject-api:$injectApiVersion" api "jakarta.annotation:jakarta.annotation-api:$annotationApiVersion" api "jakarta.ws.rs:jakarta.ws.rs-api:$jaxrsApiVersion" + api "com.google.guava:guava:$guavaVersion" implementation "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion" implementation "commons-io:commons-io:$commonsIoVersion" @@ -28,10 +29,12 @@ dependencies { testRuntimeOnly "jakarta.activation:jakarta.activation-api:$activationApiVersion" testImplementation "ch.qos.logback:logback-classic:$logbackVersion" - testImplementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" testImplementation "org.bouncycastle:bcprov-jdk15on:$bouncycastleVersion" testImplementation "org.glassfish.jersey.core:jersey-server:$jerseyVersion" testImplementation "org.mockito:mockito-core:$mockitoVersion" + + implementation project(':trellis-cache') } pitest { diff --git a/auth/oauth/src/main/java/module-info.java b/auth/oauth/src/main/java/module-info.java index 12bd52a6..533a51e1 100644 --- a/auth/oauth/src/main/java/module-info.java +++ b/auth/oauth/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,7 +16,7 @@ module org.trellisldp.auth.oauth { exports org.trellisldp.auth.oauth; - requires jakarta.inject.api; + requires jakarta.inject; requires java.ws.rs; requires java.annotation; requires jjwt.api; @@ -22,4 +24,5 @@ requires jjwt.impl; requires microprofile.config.api; requires org.slf4j; + requires org.trellisldp.cache; } diff --git a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/Authenticator.java b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/Authenticator.java index 27c66601..ac830e48 100644 --- a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/Authenticator.java +++ b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/Authenticator.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/FederatedJwtAuthenticator.java b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/FederatedJwtAuthenticator.java index 9148f0bd..dbe56c38 100644 --- a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/FederatedJwtAuthenticator.java +++ b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/FederatedJwtAuthenticator.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/JwksAuthenticator.java b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/JwksAuthenticator.java index 9b68c1c8..56a9b60b 100644 --- a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/JwksAuthenticator.java +++ b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/JwksAuthenticator.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,10 +15,6 @@ */ package org.trellisldp.auth.oauth; -import static java.util.Collections.emptyList; -import static java.util.Collections.emptyMap; -import static java.util.stream.Collectors.collectingAndThen; -import static java.util.stream.Collectors.toMap; import static org.slf4j.LoggerFactory.getLogger; import io.jsonwebtoken.Claims; @@ -24,23 +22,11 @@ import io.jsonwebtoken.JwtException; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SigningKeyResolverAdapter; -import io.jsonwebtoken.io.Deserializer; -import io.jsonwebtoken.jackson.io.JacksonDeserializer; import io.jsonwebtoken.security.SecurityException; -import java.io.IOException; -import java.io.InputStream; -import java.math.BigInteger; -import java.net.URL; import java.security.Key; -import java.util.AbstractMap.SimpleEntry; -import java.util.Base64; -import java.util.Collections; -import java.util.List; import java.util.Map; -import java.util.Objects; -import org.apache.commons.io.IOUtils; import org.slf4j.Logger; /** @@ -57,7 +43,7 @@ public class JwksAuthenticator implements Authenticator { * @param url the location of the public jwks keys */ public JwksAuthenticator(final String url) { - this.keys = buildKeys(url); + this.keys = OAuthUtils.fetchKeys(url); } @Override @@ -76,27 +62,4 @@ public Key resolveSigningKey(final JwsHeader header, final Claims claims) { } }).build().parseClaimsJws(token).getBody(); } - - private static Map buildKeys(final String location) { - // TODO eventually, this will become part of the JJWT library - final Deserializer>>> deserializer = new JacksonDeserializer<>(); - try (final InputStream input = new URL(location).openConnection().getInputStream()) { - return deserializer.deserialize(IOUtils.toByteArray(input)).getOrDefault("keys", emptyList()).stream() - .map(JwksAuthenticator::buildKeyEntry).filter(Objects::nonNull).collect(collectingAndThen( - toMap(Map.Entry::getKey, Map.Entry::getValue), Collections::unmodifiableMap)); - } catch (final IOException ex) { - LOGGER.error("Error fetching/parsing jwk document", ex); - } - return emptyMap(); - } - - private static Map.Entry buildKeyEntry(final Map jwk) { - final BigInteger modulus = new BigInteger(1, Base64.getUrlDecoder().decode(jwk.get("n"))); - final BigInteger exponent = new BigInteger(1, Base64.getUrlDecoder().decode(jwk.get("e"))); - final Key key = OAuthUtils.buildRSAPublicKey("RSA", modulus, exponent); - if (key != null && jwk.containsKey("kid")) { - return new SimpleEntry<>(jwk.get("kid"), key); - } - return null; - } } diff --git a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/JwtAuthenticator.java b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/JwtAuthenticator.java index 85717881..ad1dfb58 100644 --- a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/JwtAuthenticator.java +++ b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/JwtAuthenticator.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/NullAuthenticator.java b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/NullAuthenticator.java index e706dea4..7be19f23 100644 --- a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/NullAuthenticator.java +++ b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/NullAuthenticator.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/OAuthFilter.java b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/OAuthFilter.java index de1d8c78..57aefd36 100644 --- a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/OAuthFilter.java +++ b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/OAuthFilter.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/OAuthPrincipal.java b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/OAuthPrincipal.java index f5976656..41251182 100644 --- a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/OAuthPrincipal.java +++ b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/OAuthPrincipal.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/OAuthUtils.java b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/OAuthUtils.java index 9bba165f..8056db9d 100644 --- a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/OAuthUtils.java +++ b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/OAuthUtils.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,14 +17,21 @@ import static io.jsonwebtoken.security.Keys.hmacShaKeyFor; import static java.nio.charset.StandardCharsets.UTF_8; +import static java.util.Collections.emptyList; +import static java.util.Collections.emptyMap; +import static java.util.stream.Collectors.collectingAndThen; +import static java.util.stream.Collectors.toMap; import static org.slf4j.LoggerFactory.getLogger; import io.jsonwebtoken.Claims; +import io.jsonwebtoken.io.Deserializer; +import io.jsonwebtoken.jackson.io.JacksonDeserializer; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.math.BigInteger; +import java.net.URL; import java.nio.file.Files; import java.security.Key; import java.security.KeyFactory; @@ -33,9 +42,9 @@ import java.security.cert.CertificateException; import java.security.spec.InvalidKeySpecException; import java.security.spec.RSAPublicKeySpec; -import java.util.ArrayList; -import java.util.List; +import java.util.*; +import org.apache.commons.io.IOUtils; import org.slf4j.Logger; public final class OAuthUtils { @@ -163,6 +172,11 @@ public static Authenticator buildAuthenticatorWithTruststore(final String keysto return null; } + public static Authenticator buildAuthenticatorWithWebIdOIDC(final boolean enabled, final String baseUrl, + final int cacheSize, final int cacheExpireDays) { + return enabled ? new WebIdOIDCAuthenticator(baseUrl, cacheSize, cacheExpireDays) : null; + } + private static List filterKeyIds(final KeyStore ks, final List keyids) throws KeyStoreException { final List ids = new ArrayList<>(); for (final String id : keyids) { @@ -183,6 +197,44 @@ private static boolean isUrl(final String url) { return url.startsWith("http://") || url.startsWith("https://"); } + /** + * Fetches the key configurations from the given location and returns it in a keyId -> Key Map. + * @param location string of the URL + * @return Map containing the key configurations + */ + static Map fetchKeys(final String location) { + // TODO eventually, this will become part of the JJWT library + final Deserializer>>> deserializer = new JacksonDeserializer<>(); + try (final InputStream input = new URL(location).openStream()) { + return deserializer.deserialize(IOUtils.toByteArray(input)).getOrDefault("keys", emptyList()).stream() + .map(OAuthUtils::buildKeyEntry).filter(Objects::nonNull).collect(collectingAndThen( + toMap(Map.Entry::getKey, Map.Entry::getValue), Collections::unmodifiableMap)); + } catch (final IOException ex) { + LOGGER.error(String.format("Error fetching/parsing jwk document at location %s", location), ex); + } + return emptyMap(); + } + + private static Map.Entry buildKeyEntry(final Map jwk) { + final Key key = buildKey(jwk.get("n"), jwk.get("e")); + if (key != null && jwk.containsKey("kid")) { + return new AbstractMap.SimpleEntry<>(jwk.get("kid"), key); + } + return null; + } + + /** + * Builds a public key from its parameters as encoded as base64. + * @param n modulus + * @param e exponent + * @return the key + */ + static Key buildKey(final String n, final String e) { + final BigInteger modulus = new BigInteger(1, Base64.getUrlDecoder().decode(n)); + final BigInteger exponent = new BigInteger(1, Base64.getUrlDecoder().decode(e)); + return OAuthUtils.buildRSAPublicKey("RSA", modulus, exponent); + } + private OAuthUtils() { // prevent instantiation } diff --git a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/WebIdOIDCAuthenticator.java b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/WebIdOIDCAuthenticator.java new file mode 100644 index 00000000..a31d8a4e --- /dev/null +++ b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/WebIdOIDCAuthenticator.java @@ -0,0 +1,240 @@ +/* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.trellisldp.auth.oauth; + +import static java.util.concurrent.TimeUnit.DAYS; + +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; + +import io.jsonwebtoken.*; +import io.jsonwebtoken.io.Deserializer; +import io.jsonwebtoken.jackson.io.JacksonDeserializer; + +import java.io.InputStream; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.security.Key; +import java.util.Collections; +import java.util.Map; + +import org.apache.commons.io.IOUtils; +import org.trellisldp.cache.TrellisCache; + +/** + * An authenticator for Solid's WebId-OIDC protocol, WebId-OIDC. + * This implementation requires no WebId provider configuration, the validation is performed based on the in JWT payload + * supplied key data. + */ +public class WebIdOIDCAuthenticator implements Authenticator { + private static final String OPENID_CONFIGURATION_PATH = "/.well-known/openid-configuration"; + private static final String JWKS_URI_CLAIM = "jwks_uri"; + static final String KEY_ID_HEADER = "kid"; + static final String ID_TOKEN_CLAIM = "id_token"; + static final String CNF_CLAIM = "cnf"; + static final String TOKEN_TYPE_CLAIM = "token_type"; + static final String POP_TOKEN = "pop"; + + private final String baseUrl; + private final TrellisCache keys; + + /** + * Own exception to signal a malformed JWT according to the expectations of this authenticator. + */ + static class WebIdOIDCJwtException extends MalformedJwtException { + public WebIdOIDCJwtException(final String message) { + super(message); + } + + public WebIdOIDCJwtException(final String message, final Throwable cause) { + super(message, cause); + } + } + + /** + * Build the authenticator. + * @param baseUrl the server's base URL. + * @param cacheSize the maximum cache size + * @param cacheExpireDays the number of days after which the cache expires + */ + public WebIdOIDCAuthenticator(final String baseUrl, final int cacheSize, final int cacheExpireDays) { + this(baseUrl, cacheSize, cacheExpireDays, Collections.emptyMap()); + } + + /** + * Constructor for test purposes. + * @param baseUrl the server's base URL. + * @param cacheSize the maximum cache size + * @param cacheExpireDays the number of days after which the cache expires + * @param keys an initial key cache for this instance. + */ + WebIdOIDCAuthenticator(final String baseUrl, final int cacheSize, final int cacheExpireDays, + final Map keys) { + if (baseUrl == null) { + throw new IllegalArgumentException("Received null as baseUrl, it is required for the WebId-OIDC support."); + } + this.baseUrl = baseUrl; + final Cache cache = + CacheBuilder.newBuilder().maximumSize(cacheSize).expireAfterAccess(cacheExpireDays, DAYS).build(); + this.keys = new TrellisCache<>(cache); + for (final String id : keys.keySet()) { + this.keys.get(id, keys::get); + } + } + + @Override + public Claims parse(final String token) { + final Claims[] idTokenClaims = new Claims[1]; + final Claims claims = Jwts.parserBuilder() + .require(TOKEN_TYPE_CLAIM, POP_TOKEN) + .setSigningKeyResolver(new SigningKeyResolverAdapter() { + @Override + public Key resolveSigningKey(final JwsHeader header, final Claims claims) { + final String issuer = claims.getIssuer(); + if (issuer == null) { + throw new WebIdOIDCJwtException("Missing the issuer claim in outer JWT payload"); + } + final String idToken = claims.get(ID_TOKEN_CLAIM, String.class); + if (idToken == null) { + throw new WebIdOIDCJwtException("Missing the id_token claim in JWT payload"); + } + idTokenClaims[0] = getValidatedIdTokenClaims(issuer, idToken); + return getKey(idTokenClaims[0]); + } + }) + .build() + .parseClaimsJws(token).getBody(); + + doWebIdProviderConfirmation(idTokenClaims[0]); + final String audience = claims.getAudience(); + if (audience == null || !audience.endsWith(baseUrl)) { + throw new WebIdOIDCJwtException( + String.format("Proof of Possession failed, wrong audience claim: aud=%s", audience)); + } + return idTokenClaims[0]; + } + + private Claims getValidatedIdTokenClaims(final String issuer, final String idToken) { + return Jwts.parserBuilder() + .requireAudience(issuer) + .setSigningKeyResolver(new SigningKeyResolverAdapter() { + @Override + public Key resolveSigningKey(final JwsHeader header, final Claims claims) { + final String kid = (String) header.get(KEY_ID_HEADER); + if (kid == null) { + throw new WebIdOIDCJwtException( + String.format("Missing the key id in Id token header: idTokenHeader=%s", header)); + } + return keys.get(kid, id -> { + final String issuer = claims.getIssuer(); + if (issuer == null) { + throw new WebIdOIDCJwtException("Found no issuer claim to resolve the provider keys"); + } + final Map fetchedKeys = OAuthUtils.fetchKeys(fetchJwksUri(issuer)); + if (!fetchedKeys.containsKey(id)) { + throw new WebIdOIDCJwtException( + String.format("Couldn't find key id %s for token issuer %s", id, issuer)); + } + return fetchedKeys.get(id); + }); + } + }) + .build() + .parseClaimsJws(idToken).getBody(); + } + + private static String fetchJwksUri(final String issuer) { + final Deserializer> deserializer = new JacksonDeserializer<>(); + final String oidcCnfUrl = issuer + OPENID_CONFIGURATION_PATH; + try (final InputStream input = new URL(oidcCnfUrl).openConnection().getInputStream()) { + final String jwksUri = (String) deserializer.deserialize(IOUtils.toByteArray(input)).get(JWKS_URI_CLAIM); + if (jwksUri == null) { + throw new WebIdOIDCJwtException("No JWKS URI claim found in WebId-OIDC provider configuration"); + } + return jwksUri; + } catch (final Exception ex) { + throw new WebIdOIDCJwtException( + String.format("Error fetching/parsing WebId-OIDC provider configuration for %s", issuer), ex); + } + } + + private static void doWebIdProviderConfirmation(final Claims idTokenClaims) { + final String issuer = idTokenClaims.getIssuer(); + if (issuer == null) { + throw new WebIdOIDCJwtException("WebId provider confirmation failed. Missing needed issuer claim."); + } + final String webId = idTokenClaims.get(OAuthUtils.WEBID, String.class); + final String subject = idTokenClaims.getSubject(); + if (webId == null && subject == null) { + final String msg = + "WebId provider confirmation failed. At least the webid or the sub claim must be present, found none."; + throw new WebIdOIDCJwtException(msg); + } + final String webIdClaim = webId != null ? webId : subject; + doSameOriginOrSubDomainConfirmation(issuer, webIdClaim); + } + + private static void doSameOriginOrSubDomainConfirmation(final String issuer, final String webIdClaim) { + try { + final URI webIdURI = new URI(webIdClaim); + final URI issuerURI = new URI(issuer); + final boolean isIssuerHttpURI = issuerURI.getScheme().startsWith("http"); + final boolean isWebIdHttpURI = webIdURI.getScheme().startsWith("http"); + final boolean isSubDomainOrSameOrigin = webIdURI.getHost().endsWith(issuerURI.getHost()); + if (!isIssuerHttpURI || !isWebIdHttpURI) { + throw new WebIdOIDCJwtException(String.format( + "Issuer and WebId must be HTTP(S) URIs, (iss, webid)=(%s, %s).", issuer, webIdClaim)); + } + if (!isSubDomainOrSameOrigin) { + throw new WebIdOIDCJwtException(String.format( + "WebId has neither same domain nor is subdomain of issuer, (iss, webid)=(%s, %s).", + issuer, webIdClaim)); + } + } catch (final URISyntaxException e) { + throw new WebIdOIDCJwtException( + String.format("WebId provider confirmation failed, received invalid URI: (iss, webid)=(%s, %s).", + issuer, webIdClaim), e); + } + } + + private static Key getKey(final Claims idTokenClaims) { + final Map> cnf; + try { + cnf = idTokenClaims.get(CNF_CLAIM, Map.class); + if (cnf == null) { + throw new WebIdOIDCJwtException(String.format("Missing cnf in: %s", idTokenClaims)); + } + final Map jwk = cnf.get("jwk"); + final String alg = jwk.get("alg"); + final String n = jwk.get("n"); + final String e = jwk.get("e"); + if (alg == null || n == null || e == null) { + final String msg = + String.format("Missing at least one algorithm parameter under cnf.jwk. (alg, n, e): (%s, %s, %s)", + alg, n, e); + throw new WebIdOIDCJwtException(msg); + } + if (!alg.startsWith("RS")) { + final String msg = String.format("Expecting RSA algorithm under: %s, but got: %s", "cnf.jwk", alg); + throw new WebIdOIDCJwtException(msg); + } + return OAuthUtils.buildKey(n, e); + } catch (ClassCastException | RequiredTypeException e) { + throw new WebIdOIDCJwtException(String.format("Malformed cnf in: %s", idTokenClaims), e); + } + } +} diff --git a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/package-info.java b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/package-info.java index 76b6abbf..9c65de62 100644 --- a/auth/oauth/src/main/java/org/trellisldp/auth/oauth/package-info.java +++ b/auth/oauth/src/main/java/org/trellisldp/auth/oauth/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/oauth/src/test/java/org/trellisldp/auth/oauth/FederatedJwtAuthenticatorTest.java b/auth/oauth/src/test/java/org/trellisldp/auth/oauth/FederatedJwtAuthenticatorTest.java index 4df4c850..43a0d3a6 100644 --- a/auth/oauth/src/test/java/org/trellisldp/auth/oauth/FederatedJwtAuthenticatorTest.java +++ b/auth/oauth/src/test/java/org/trellisldp/auth/oauth/FederatedJwtAuthenticatorTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/oauth/src/test/java/org/trellisldp/auth/oauth/JwksAuthenticatorTest.java b/auth/oauth/src/test/java/org/trellisldp/auth/oauth/JwksAuthenticatorTest.java index 0ce26fa2..3e79c90c 100644 --- a/auth/oauth/src/test/java/org/trellisldp/auth/oauth/JwksAuthenticatorTest.java +++ b/auth/oauth/src/test/java/org/trellisldp/auth/oauth/JwksAuthenticatorTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/oauth/src/test/java/org/trellisldp/auth/oauth/JwtAuthenticatorTest.java b/auth/oauth/src/test/java/org/trellisldp/auth/oauth/JwtAuthenticatorTest.java index 1a111761..9465336f 100644 --- a/auth/oauth/src/test/java/org/trellisldp/auth/oauth/JwtAuthenticatorTest.java +++ b/auth/oauth/src/test/java/org/trellisldp/auth/oauth/JwtAuthenticatorTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/oauth/src/test/java/org/trellisldp/auth/oauth/NullAuthenticatorTest.java b/auth/oauth/src/test/java/org/trellisldp/auth/oauth/NullAuthenticatorTest.java index 3229b64d..b6bafa61 100644 --- a/auth/oauth/src/test/java/org/trellisldp/auth/oauth/NullAuthenticatorTest.java +++ b/auth/oauth/src/test/java/org/trellisldp/auth/oauth/NullAuthenticatorTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/oauth/src/test/java/org/trellisldp/auth/oauth/OAuthFilterTest.java b/auth/oauth/src/test/java/org/trellisldp/auth/oauth/OAuthFilterTest.java index 6d3beda3..a010b0db 100644 --- a/auth/oauth/src/test/java/org/trellisldp/auth/oauth/OAuthFilterTest.java +++ b/auth/oauth/src/test/java/org/trellisldp/auth/oauth/OAuthFilterTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/oauth/src/test/java/org/trellisldp/auth/oauth/OAuthPrincipalTest.java b/auth/oauth/src/test/java/org/trellisldp/auth/oauth/OAuthPrincipalTest.java index 498ce90b..693a099b 100644 --- a/auth/oauth/src/test/java/org/trellisldp/auth/oauth/OAuthPrincipalTest.java +++ b/auth/oauth/src/test/java/org/trellisldp/auth/oauth/OAuthPrincipalTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/oauth/src/test/java/org/trellisldp/auth/oauth/OAuthUtilsTest.java b/auth/oauth/src/test/java/org/trellisldp/auth/oauth/OAuthUtilsTest.java index d3360589..7e0d949b 100644 --- a/auth/oauth/src/test/java/org/trellisldp/auth/oauth/OAuthUtilsTest.java +++ b/auth/oauth/src/test/java/org/trellisldp/auth/oauth/OAuthUtilsTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/auth/oauth/src/test/java/org/trellisldp/auth/oauth/WebIdOIDCAuthenticatorTest.java b/auth/oauth/src/test/java/org/trellisldp/auth/oauth/WebIdOIDCAuthenticatorTest.java new file mode 100644 index 00000000..48a68f54 --- /dev/null +++ b/auth/oauth/src/test/java/org/trellisldp/auth/oauth/WebIdOIDCAuthenticatorTest.java @@ -0,0 +1,313 @@ +/* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.trellisldp.auth.oauth; + +import static java.util.Base64.getUrlDecoder; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.trellisldp.auth.oauth.WebIdOIDCAuthenticator.*; + +import io.jsonwebtoken.Claims; +import io.jsonwebtoken.IncorrectClaimException; +import io.jsonwebtoken.Jwts; +import io.jsonwebtoken.MissingClaimException; +import io.jsonwebtoken.impl.DefaultClaims; + +import java.math.BigInteger; +import java.security.Key; +import java.security.KeyFactory; +import java.security.NoSuchAlgorithmException; +import java.security.Principal; +import java.security.spec.InvalidKeySpecException; +import java.security.spec.RSAPrivateKeySpec; +import java.security.spec.RSAPublicKeySpec; +import java.util.HashMap; +import java.util.Map; + +import org.junit.jupiter.api.Test; + +class WebIdOIDCAuthenticatorTest { + + private static final String base64PrivateExponent = "VRPRBm9dCoAJfBbEz5oAHEz7Tnm" + + "0i0O6m5yj7NwqAZOj9i4ZwgZ8VZQo88oxZQWNaYd1yKeoQhUsJija_vxQEPXO1Q2q6OqMcwTBH0wyGhIFp--z2dAyRlDVLUTQbJUXyq" + + "ammdh7b16-igH-BB67jfolM-cw-O7YaN7GrxCCYX5bI38IipeYfcroeIUXdLYmmUdNy7c8P2_K4O-iHQ6A4AUtQRUOzt2FGOdmlGZih" + + "upI9YprshIy9CZq_iA3BcOl4Gcc-ljwwUzT0M_4jt53DCV7oxqWVt9WRdYDNoD62g2FzQ-1nYUqsz4YChk1MuOPV1xFpRklwSpt5dfh" + + "uldnbQ"; + private static final BigInteger exponent = new BigInteger(1, getUrlDecoder().decode(base64PrivateExponent)); + + private static final String base64PublicExponent = "AQAB"; + + private static final BigInteger publicExponent = + new BigInteger(1, getUrlDecoder().decode(base64PublicExponent)); + + private static final String base64Modulus = "oMyjaeUbmnqojRpMBDbWbfBFitd_" + + "dQcFJ96CDWwzsVcyAK3_kp4dEvhc2KLBjrmE69gJ-4HRuPF-kulDEmpC-MVx9eOihdUG9XV0ZA_eYWj9RoI_Gt3TUqTxlQH_nJRADTf" + + "y82fOCCboKpaQ2idZH55Vb0FDbau2b2462tYRmcnxTFjClP4fDTTubI-3oFJ4tKMjynvUT34mCrZPiM8Q4noxVoyRYpzUTL1USxdUf5" + + "6IKSB8NduH438zhMXE5VLC6PzhR3i_4KKpe4nq2otsrJ3KlEc7Me6UeiMXxPYz8rrPovW5L3LFWDmntGs5q923fBZFLFg8yBgMdTine" + + "aahEQ"; + private static final BigInteger modulus = new BigInteger(1, getUrlDecoder().decode(base64Modulus)); + private static final String DEFAULT_KEY_ID = "VRPRBm9dCo"; + + private static final String BASE_URL = "https://trellis.org"; + private static final String DEFAULT_ID_TOKEN_SSUER = "https://solid.community"; + private static final String DEFAULT_ISSUER = "client as issuer"; + + private static final Map.Entry DEFAULT_SUBJECT_ENTRY = + new WebIdEntry("sub", "https://bob.solid.community/profile/card#me"); + + private static final Key privateKey; + static { + try { + privateKey = KeyFactory.getInstance("RSA").generatePrivate(new RSAPrivateKeySpec(modulus, exponent)); + } catch (InvalidKeySpecException | NoSuchAlgorithmException e) { + throw new IllegalArgumentException("Error creating RSA key!", e); + } + } + + private static final Key publicKey; + static { + try { + publicKey = KeyFactory.getInstance("RSA").generatePublic(new RSAPublicKeySpec(modulus, publicExponent)); + } catch (InvalidKeySpecException | NoSuchAlgorithmException e) { + throw new IllegalArgumentException("Error creating RSA public key!", e); + } + } + + private static final Map headers = new HashMap<>(); + static { + headers.put("alg", "RS256"); + headers.put(KEY_ID_HEADER, DEFAULT_KEY_ID); + } + + private static final Map keyCache = new HashMap<>(); + static { + keyCache.put(DEFAULT_KEY_ID, publicKey); + } + + private final WebIdOIDCAuthenticator authenticator = new WebIdOIDCAuthenticator(BASE_URL, 50, 30, keyCache); + + private static class WebIdEntry implements Map.Entry { + private final String key; + private final String value; + + WebIdEntry() { + this(null, null); + } + + WebIdEntry(final String key, final String value) { + this.key = key; + this.value = value; + } + @Override public String getKey() { + return key; + } + + @Override public String getValue() { + return value; + } + + @Override public String setValue(final String v) { + throw new UnsupportedOperationException(); + } + } + + @Test + void testAuthenticateNoIdToken() { + final Claims claims = new DefaultClaims(); + claims.setIssuer("example.com"); + final String token = createJWTToken(headers, claims); + + assertThrows(WebIdOIDCJwtException.class, () -> authenticator.authenticate(token)); + } + + @Test + void testAuthenticateNoIssuer() { + final String token = createPOPToken(null, BASE_URL, POP_TOKEN, headers, + DEFAULT_ID_TOKEN_SSUER, DEFAULT_ISSUER, DEFAULT_SUBJECT_ENTRY, createCNF(base64Modulus)); + + assertThrows(WebIdOIDCJwtException.class, () -> authenticator.authenticate(token)); + } + + @Test + void testAuthenticateNoIdTokenAudienceMatch() { + final String token = createPOPToken(DEFAULT_ISSUER, BASE_URL, POP_TOKEN, headers, + DEFAULT_ID_TOKEN_SSUER, "wrong aud", DEFAULT_SUBJECT_ENTRY, createCNF(base64Modulus)); + + assertThrows(IncorrectClaimException.class, () -> authenticator.authenticate(token)); + } + + @Test + void testAuthenticateNoTokenType() { + final String token = createPOPToken(DEFAULT_ISSUER, BASE_URL, null, headers, + DEFAULT_ID_TOKEN_SSUER, DEFAULT_ISSUER, DEFAULT_SUBJECT_ENTRY, createCNF(base64Modulus)); + + assertThrows(MissingClaimException.class, () -> authenticator.authenticate(token)); + } + + @Test + void testAuthenticateNoKeyId() { + final Map headers = new HashMap<>(); + headers.put("alg", "RS256"); + final String token = createPOPToken(DEFAULT_ISSUER, BASE_URL, POP_TOKEN, headers, DEFAULT_ID_TOKEN_SSUER, + DEFAULT_ISSUER, new WebIdEntry(OAuthUtils.WEBID, DEFAULT_ID_TOKEN_SSUER + "/bob/profile#i"), + createCNF(base64Modulus)); + + assertThrows(WebIdOIDCJwtException.class, () -> authenticator.authenticate(token)); + } + + @Test + void testAuthenticateNoKeyCnf() { + final String internalJws = Jwts.builder().setHeader(headers).claim("foo", "bar") + .signWith(privateKey).compact(); + final Claims claims = new DefaultClaims(); + claims.put(ID_TOKEN_CLAIM, internalJws); + final String token = createJWTToken(headers, claims); + + assertThrows(WebIdOIDCJwtException.class, () -> authenticator.authenticate(token)); + } + + @Test + void testWrongTypeInJwk() { + final String token = createPOPToken(BASE_URL, DEFAULT_ID_TOKEN_SSUER, DEFAULT_SUBJECT_ENTRY, + createCNF(64)); + + assertThrows(WebIdOIDCJwtException.class, () -> authenticator.authenticate(token)); + } + + @Test + void testCnfOfWrongType() { + final String token = createPOPToken(BASE_URL, DEFAULT_ID_TOKEN_SSUER, DEFAULT_SUBJECT_ENTRY, "Wrong"); + + assertThrows(WebIdOIDCJwtException.class, () -> authenticator.authenticate(token)); + } + + @Test + void testWebIdProviderConfirmation() { + final String token = + createPOPToken(BASE_URL, "https://dark.com", DEFAULT_SUBJECT_ENTRY, + createCNF(base64Modulus)); + + assertThrows(WebIdOIDCJwtException.class, () -> authenticator.authenticate(token)); + } + + @Test + void testNoWebIdClaim() { + final String token = + createPOPToken(BASE_URL, DEFAULT_ID_TOKEN_SSUER, new WebIdEntry(), createCNF(base64Modulus)); + + assertThrows(WebIdOIDCJwtException.class, () -> authenticator.authenticate(token)); + } + + @Test + void testNoIdTokenIssuerClaim() { + final String token = + createPOPToken(BASE_URL, null, DEFAULT_SUBJECT_ENTRY, createCNF(base64Modulus)); + + assertThrows(WebIdOIDCJwtException.class, () -> authenticator.authenticate(token)); + } + + @Test + void testNoAudienceClaim() { + final String token = createPOPToken(null, DEFAULT_ID_TOKEN_SSUER, DEFAULT_SUBJECT_ENTRY, + createCNF(base64Modulus)); + + assertThrows(WebIdOIDCJwtException.class, () -> authenticator.authenticate(token)); + } + + @Test + void testWrongAudienceClaim() { + final String token = createPOPToken("https://attacker.com", DEFAULT_ID_TOKEN_SSUER, + DEFAULT_SUBJECT_ENTRY, createCNF(base64Modulus)); + + assertThrows(WebIdOIDCJwtException.class, () -> authenticator.authenticate(token)); + } + + @Test + void testGreenPathWithSameOrigin() { + final String token = createPOPToken(BASE_URL, DEFAULT_ID_TOKEN_SSUER, + new WebIdEntry("sub", DEFAULT_ID_TOKEN_SSUER + "/bob/profile#i"), createCNF(base64Modulus)); + + final Principal principal = authenticator.authenticate(token); + assertNotNull(principal); + } + + @Test + void testGreenPathWithSubDomain() { + final String token = createPOPToken(BASE_URL, DEFAULT_ID_TOKEN_SSUER, DEFAULT_SUBJECT_ENTRY, + createCNF(base64Modulus)); + + final Principal principal = authenticator.authenticate(token); + assertNotNull(principal); + } + + @Test + void testGreenPathWithWebIdClaim() { + final String token = createPOPToken(BASE_URL, DEFAULT_ID_TOKEN_SSUER, + new WebIdEntry(OAuthUtils.WEBID, DEFAULT_ID_TOKEN_SSUER + "/bob/profile#i"), createCNF(base64Modulus)); + + final Principal principal = authenticator.authenticate(token); + assertNotNull(principal); + } + + private static Map createCNF(final Object n) { + final Map cnf = new HashMap<>(); + final Map jwk = new HashMap<>(); + cnf.put("jwk", jwk); + jwk.put("alg", "RS256"); + jwk.put("n", n); + jwk.put("e", base64PublicExponent); + return cnf; + } + + private static String createPOPToken(final String audience, final String idTokenIssuer, + final Map.Entry webIdClaim, final Object cnf) { + return createPOPToken(DEFAULT_ISSUER, audience, POP_TOKEN, headers, idTokenIssuer, DEFAULT_ISSUER, + webIdClaim, cnf); + } + + private static String createPOPToken(final String issuer, final String audience, final String tokenType, + final Map idTokenHeaders, final String idTokenIssuer, + final String idTokenAudience, final Map.Entry webIdClaim, + final Object cnf) { + final DefaultClaims idTokenClaims = new DefaultClaims(); + idTokenClaims.setIssuer(idTokenIssuer); + if (idTokenAudience != null) { + idTokenClaims.setAudience(idTokenAudience); + } + idTokenClaims.put(webIdClaim.getKey(), webIdClaim.getValue()); + idTokenClaims.put(CNF_CLAIM, cnf); + final String internalJws = createJWTToken(idTokenHeaders, idTokenClaims); + + final Claims claims = new DefaultClaims(); + if (issuer != null) { + claims.setIssuer(issuer); + } + claims.setAudience(audience); + claims.put(ID_TOKEN_CLAIM, internalJws); + if (tokenType != null) { + claims.put(TOKEN_TYPE_CLAIM, tokenType); + } + return createJWTToken(headers, claims); + } + + private static String createJWTToken(final Map headers, final Claims claims) { + return Jwts.builder() + .setHeader(headers) + .setClaims(claims) + .signWith(privateKey) + .compact(); + } +} \ No newline at end of file diff --git a/build.gradle b/build.gradle index df438612..b33dbb17 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ ext { activationApiVersion = "1.2.2" annotationApiVersion = "1.3.5" cdiApiVersion = "2.0.2" - injectApiVersion = "1.0" + injectApiVersion = "1.0.1" jaxbApiVersion = "2.3.3" jaxrsApiVersion = "2.1.6" jmsApiVersion = "2.0.3" @@ -42,22 +42,23 @@ ext { // MicroProfile microprofileConfigVersion = "1.4" microprofileHealthVersion = "2.2" - microprofileMetricsVersion = "2.3" + microprofileMetricsVersion = "2.3.1" microprofileJwtVersion = "1.1.1" microprofileOpenapiVersion = "1.1.2" microprofileReactiveMessagingVersion = "1.0" // Component dependencies activeMqVersion = "5.15.12" - dropwizardVersion = "2.0.8" + dropwizardVersion = "2.0.9" guavaVersion = "29.0-jre" - jacksonVersion = "2.10.3" + jacksonVersion = "2.11.0" jenaVersion = "3.14.0" jjwtVersion = "0.11.1" jsonldVersion = "0.13.0" kafkaVersion = "2.5.0" mustacheVersion = "0.9.6" - quarkusVersion = "1.3.2.Final" + nettyVersion = "4.1.49.Final" + quarkusVersion = "1.4.2.Final" rabbitMqVersion = "5.9.0" rxjavaVersion = "2.2.19" @@ -70,7 +71,7 @@ ext { bouncycastleVersion = "1.65" commonsTextVersion = "1.8" cxfVersion = "3.3.6" - glassfishJaxbVersion = "2.3.2" + glassfishJaxbVersion = "2.3.3" jerseyVersion = "2.30.1" junitVersion = "5.6.2" junitLauncherVersion = "1.6.2" @@ -79,8 +80,8 @@ ext { mockitoVersion = "3.3.3" qpidVersion = "8.0.0" sleepycatVersion = "18.3.12" - smallryeConfigVersion = "1.5.0" - smallryeHealthVersion = "2.2.0" + smallryeConfigVersion = "1.7.0" + smallryeHealthVersion = "2.2.1" smallryeJwtVersion = "2.1.1" smallryeReactiveVersion = "1.0.8" smallryeReactiveOperatorsVersion = "1.0.12" @@ -90,7 +91,7 @@ ext { // Tooling jacocoToolVersion = "0.8.5" checkstyleToolVersion = "8.31" - pitestToolVersion = "1.4.11" + pitestToolVersion = "1.5.1" pmdToolVersion = "6.22.0" // OSGi @@ -100,7 +101,6 @@ ext { interceptorVersion = "1.2.5" jenaOsgiVersion = "3.13.1" jenaVersionRange = "[3.13,4)" - jsonApiVersion = "1.1.6" kafkaOsgiVersion = "2.3.1_1" karafVersion = "4.2.8" mustacheOsgiVersion = "0.9.6_1" @@ -141,9 +141,9 @@ allprojects { subproj -> ext { vendor = 'Trellis LDP' - homepage = 'https://www.trellisldp.org' + homepage = 'https://www.trellisldp.org/' docURL = 'https://www.trellisldp.org/docs/trellis/current/apidocs/' - license = 'Apache 2' + license = 'Apache-2.0' } @@ -357,6 +357,11 @@ subprojects { subproj -> } } + downloadLicenses { + includeProjectDependencies = true + dependencyConfiguration = 'compileClasspath' + } + publishing { publications { maven(MavenPublication) { @@ -389,9 +394,10 @@ subprojects { subproj -> licenses { license { - name = 'Apache License, Version 2.0' - url = 'http://www.apache.org/licenses/LICENSE-2.0' - comments = 'Copyright (c) 2017-2020 Trellis LDP' + name = 'Apache-2.0' + url = 'https://www.apache.org/licenses/LICENSE-2.0.txt' + comments = 'Copyright (c) 2017 - 2020 Aaron Coburn and individual contributors' + distribution = 'repo' } } diff --git a/buildtools/src/main/resources/license/HEADER.txt b/buildtools/src/main/resources/license/HEADER.txt index 51fca54c..bf574f0d 100644 --- a/buildtools/src/main/resources/license/HEADER.txt +++ b/buildtools/src/main/resources/license/HEADER.txt @@ -1,3 +1,5 @@ +Copyright (c) 2020 Aaron Coburn and individual contributors + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/components/app/build.gradle b/components/app/build.gradle index 3d875b67..4026e4e6 100644 --- a/components/app/build.gradle +++ b/components/app/build.gradle @@ -23,7 +23,7 @@ dependencies { testRuntimeOnly "jakarta.activation:jakarta.activation-api:$activationApiVersion" testImplementation "ch.qos.logback:logback-classic:$logbackVersion" - testImplementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" testImplementation("org.jboss.weld:weld-junit5:$weldVersion") { exclude group: "org.jboss.spec.javax.interceptor", module: "jboss-interceptors-api_1.2_spec" exclude group: "org.jboss.spec.javax.el", module: "jboss-el-api_3.0_spec" diff --git a/components/app/src/main/java/module-info.java b/components/app/src/main/java/module-info.java index 6d8bbab1..17c51ff7 100644 --- a/components/app/src/main/java/module-info.java +++ b/components/app/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,7 +20,7 @@ requires transitive org.trellisldp.http; requires transitive org.trellisldp.vocabulary; - requires jakarta.inject.api; + requires jakarta.inject; requires jakarta.enterprise.cdi.api; opens org.trellisldp.app; diff --git a/components/app/src/main/java/org/trellisldp/app/AppUtils.java b/components/app/src/main/java/org/trellisldp/app/AppUtils.java index 3fbf8ab6..7c869fc9 100644 --- a/components/app/src/main/java/org/trellisldp/app/AppUtils.java +++ b/components/app/src/main/java/org/trellisldp/app/AppUtils.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/app/src/main/java/org/trellisldp/app/BaseServiceBundler.java b/components/app/src/main/java/org/trellisldp/app/BaseServiceBundler.java index ebf8c90a..218eea7b 100644 --- a/components/app/src/main/java/org/trellisldp/app/BaseServiceBundler.java +++ b/components/app/src/main/java/org/trellisldp/app/BaseServiceBundler.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/app/src/main/java/org/trellisldp/app/ConstraintServices.java b/components/app/src/main/java/org/trellisldp/app/ConstraintServices.java index 3c66eb32..820cf0b0 100644 --- a/components/app/src/main/java/org/trellisldp/app/ConstraintServices.java +++ b/components/app/src/main/java/org/trellisldp/app/ConstraintServices.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/app/src/main/java/org/trellisldp/app/DefaultConstraintServices.java b/components/app/src/main/java/org/trellisldp/app/DefaultConstraintServices.java index b360b2fd..50b11813 100644 --- a/components/app/src/main/java/org/trellisldp/app/DefaultConstraintServices.java +++ b/components/app/src/main/java/org/trellisldp/app/DefaultConstraintServices.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/app/src/main/java/org/trellisldp/app/package-info.java b/components/app/src/main/java/org/trellisldp/app/package-info.java index 60ff70a4..fc6fa655 100644 --- a/components/app/src/main/java/org/trellisldp/app/package-info.java +++ b/components/app/src/main/java/org/trellisldp/app/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/app/src/test/java/org/trellisldp/app/AppUtilsTest.java b/components/app/src/test/java/org/trellisldp/app/AppUtilsTest.java index 9b9f53e0..feadb0bc 100644 --- a/components/app/src/test/java/org/trellisldp/app/AppUtilsTest.java +++ b/components/app/src/test/java/org/trellisldp/app/AppUtilsTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/app/src/test/java/org/trellisldp/app/CDIConstraintServices.java b/components/app/src/test/java/org/trellisldp/app/CDIConstraintServices.java index 2fdfcae1..c695bdc2 100644 --- a/components/app/src/test/java/org/trellisldp/app/CDIConstraintServices.java +++ b/components/app/src/test/java/org/trellisldp/app/CDIConstraintServices.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/app/src/test/java/org/trellisldp/app/CDIServiceBundlerTest.java b/components/app/src/test/java/org/trellisldp/app/CDIServiceBundlerTest.java index 74387aef..55dcecd2 100644 --- a/components/app/src/test/java/org/trellisldp/app/CDIServiceBundlerTest.java +++ b/components/app/src/test/java/org/trellisldp/app/CDIServiceBundlerTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/app/src/test/java/org/trellisldp/app/DefaultConstraintServicesTest.java b/components/app/src/test/java/org/trellisldp/app/DefaultConstraintServicesTest.java index d450340c..33412ec3 100644 --- a/components/app/src/test/java/org/trellisldp/app/DefaultConstraintServicesTest.java +++ b/components/app/src/test/java/org/trellisldp/app/DefaultConstraintServicesTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/app/src/test/java/org/trellisldp/app/TestServices.java b/components/app/src/test/java/org/trellisldp/app/TestServices.java index 6aff4b54..63c2c60f 100644 --- a/components/app/src/test/java/org/trellisldp/app/TestServices.java +++ b/components/app/src/test/java/org/trellisldp/app/TestServices.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/audit/src/main/java/module-info.java b/components/audit/src/main/java/module-info.java index b14b4946..739b19ef 100644 --- a/components/audit/src/main/java/module-info.java +++ b/components/audit/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/audit/src/main/java/org/trellisldp/audit/DefaultAuditService.java b/components/audit/src/main/java/org/trellisldp/audit/DefaultAuditService.java index 4f24c4ae..51980a08 100644 --- a/components/audit/src/main/java/org/trellisldp/audit/DefaultAuditService.java +++ b/components/audit/src/main/java/org/trellisldp/audit/DefaultAuditService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/audit/src/main/java/org/trellisldp/audit/package-info.java b/components/audit/src/main/java/org/trellisldp/audit/package-info.java index 6cd98bca..a561bc13 100644 --- a/components/audit/src/main/java/org/trellisldp/audit/package-info.java +++ b/components/audit/src/main/java/org/trellisldp/audit/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/audit/src/test/java/org/trellisldp/audit/DefaultAuditServiceTest.java b/components/audit/src/test/java/org/trellisldp/audit/DefaultAuditServiceTest.java index e06a06ed..fdd71262 100644 --- a/components/audit/src/test/java/org/trellisldp/audit/DefaultAuditServiceTest.java +++ b/components/audit/src/test/java/org/trellisldp/audit/DefaultAuditServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/cache/src/main/java/module-info.java b/components/cache/src/main/java/module-info.java index c7a245c1..56b821a6 100644 --- a/components/cache/src/main/java/module-info.java +++ b/components/cache/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/cache/src/main/java/org/trellisldp/cache/TrellisCache.java b/components/cache/src/main/java/org/trellisldp/cache/TrellisCache.java index 46a52fda..bd3ab9cf 100644 --- a/components/cache/src/main/java/org/trellisldp/cache/TrellisCache.java +++ b/components/cache/src/main/java/org/trellisldp/cache/TrellisCache.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/cache/src/main/java/org/trellisldp/cache/package-info.java b/components/cache/src/main/java/org/trellisldp/cache/package-info.java index 2bcb48d3..08268eac 100644 --- a/components/cache/src/main/java/org/trellisldp/cache/package-info.java +++ b/components/cache/src/main/java/org/trellisldp/cache/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/cache/src/test/java/org/trellisldp/cache/TrellisCacheTest.java b/components/cache/src/test/java/org/trellisldp/cache/TrellisCacheTest.java index 80392ae0..58c3806d 100644 --- a/components/cache/src/test/java/org/trellisldp/cache/TrellisCacheTest.java +++ b/components/cache/src/test/java/org/trellisldp/cache/TrellisCacheTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/cdi/build.gradle b/components/cdi/build.gradle index f134abf7..821e2f11 100644 --- a/components/cdi/build.gradle +++ b/components/cdi/build.gradle @@ -19,7 +19,7 @@ dependencies { testRuntimeOnly "jakarta.activation:jakarta.activation-api:$activationApiVersion" testImplementation "ch.qos.logback:logback-classic:$logbackVersion" - testImplementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" testImplementation "org.apache.commons:commons-rdf-simple:$commonsRdfVersion" testImplementation("org.jboss.weld:weld-junit5:$weldVersion") { exclude group: "org.jboss.spec.javax.interceptor", module: "jboss-interceptors-api_1.2_spec" diff --git a/components/cdi/src/main/java/module-info.java b/components/cdi/src/main/java/module-info.java index 5922e03f..c8ff8e54 100644 --- a/components/cdi/src/main/java/module-info.java +++ b/components/cdi/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -17,7 +19,7 @@ requires transitive org.trellisldp.api; requires transitive org.trellisldp.app; - requires jakarta.inject.api; + requires jakarta.inject; requires jakarta.enterprise.cdi.api; opens org.trellisldp.cdi; diff --git a/components/cdi/src/main/java/org/trellisldp/cdi/CDIConstraintServices.java b/components/cdi/src/main/java/org/trellisldp/cdi/CDIConstraintServices.java index d8269d76..6d71b797 100644 --- a/components/cdi/src/main/java/org/trellisldp/cdi/CDIConstraintServices.java +++ b/components/cdi/src/main/java/org/trellisldp/cdi/CDIConstraintServices.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/cdi/src/main/java/org/trellisldp/cdi/package-info.java b/components/cdi/src/main/java/org/trellisldp/cdi/package-info.java index 0d2e3811..074cd018 100644 --- a/components/cdi/src/main/java/org/trellisldp/cdi/package-info.java +++ b/components/cdi/src/main/java/org/trellisldp/cdi/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/cdi/src/test/java/org/trellisldp/cdi/CDIConstraintServicesTest.java b/components/cdi/src/test/java/org/trellisldp/cdi/CDIConstraintServicesTest.java index b3cd8d92..2370caad 100644 --- a/components/cdi/src/test/java/org/trellisldp/cdi/CDIConstraintServicesTest.java +++ b/components/cdi/src/test/java/org/trellisldp/cdi/CDIConstraintServicesTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/constraint-rules/src/main/java/module-info.java b/components/constraint-rules/src/main/java/module-info.java index 84be4548..6ecd0d76 100644 --- a/components/constraint-rules/src/main/java/module-info.java +++ b/components/constraint-rules/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/constraint-rules/src/main/java/org/trellisldp/constraint/LdpConstraintService.java b/components/constraint-rules/src/main/java/org/trellisldp/constraint/LdpConstraintService.java index 3f7e1314..63f73920 100644 --- a/components/constraint-rules/src/main/java/org/trellisldp/constraint/LdpConstraintService.java +++ b/components/constraint-rules/src/main/java/org/trellisldp/constraint/LdpConstraintService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/constraint-rules/src/main/java/org/trellisldp/constraint/package-info.java b/components/constraint-rules/src/main/java/org/trellisldp/constraint/package-info.java index 483b9505..b672b8c7 100644 --- a/components/constraint-rules/src/main/java/org/trellisldp/constraint/package-info.java +++ b/components/constraint-rules/src/main/java/org/trellisldp/constraint/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/constraint-rules/src/test/java/org/trellisldp/constraint/LdpConstraintServiceTest.java b/components/constraint-rules/src/test/java/org/trellisldp/constraint/LdpConstraintServiceTest.java index b3376885..7ecc8afc 100644 --- a/components/constraint-rules/src/test/java/org/trellisldp/constraint/LdpConstraintServiceTest.java +++ b/components/constraint-rules/src/test/java/org/trellisldp/constraint/LdpConstraintServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/build.gradle b/components/dropwizard/build.gradle index 0426344d..45300b67 100644 --- a/components/dropwizard/build.gradle +++ b/components/dropwizard/build.gradle @@ -28,7 +28,7 @@ dependencies { testRuntimeOnly "jakarta.activation:jakarta.activation-api:$activationApiVersion" testImplementation "ch.qos.logback:logback-classic:$logbackVersion" - testImplementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" testImplementation "org.hamcrest:hamcrest:$hamcrestVersion" testImplementation("org.apache.commons:commons-rdf-jena:$commonsRdfVersion") { exclude group: 'org.apache.jena', module: 'jena-osgi' diff --git a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/AbstractTrellisApplication.java b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/AbstractTrellisApplication.java index 0161530d..cb54b584 100644 --- a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/AbstractTrellisApplication.java +++ b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/AbstractTrellisApplication.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/CrossOriginResourceSharingFilter.java b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/CrossOriginResourceSharingFilter.java index cafb3cfa..6e73823a 100644 --- a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/CrossOriginResourceSharingFilter.java +++ b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/CrossOriginResourceSharingFilter.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/TrellisUtils.java b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/TrellisUtils.java index e82afbfd..af88803d 100644 --- a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/TrellisUtils.java +++ b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/TrellisUtils.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -35,10 +37,7 @@ import org.trellisldp.auth.oauth.OAuthFilter; import org.trellisldp.auth.oauth.OAuthUtils; import org.trellisldp.cache.TrellisCache; -import org.trellisldp.dropwizard.config.AuthConfiguration; -import org.trellisldp.dropwizard.config.CORSConfiguration; -import org.trellisldp.dropwizard.config.JwtAuthConfiguration; -import org.trellisldp.dropwizard.config.TrellisConfiguration; +import org.trellisldp.dropwizard.config.*; import org.trellisldp.webac.WebAcService; /** @@ -46,24 +45,33 @@ */ final class TrellisUtils { - public static Authenticator getJwtAuthenticator(final JwtAuthConfiguration config) { + public static Authenticator getJwtAuthenticator(final TrellisConfiguration config) { + final JwtAuthConfiguration jwtConfig = config.getAuth().getJwt(); final Authenticator jwksAuthenticator = OAuthUtils.buildAuthenticatorWithJwk( - config.getJwks()); + jwtConfig.getJwks()); if (jwksAuthenticator != null) { return jwksAuthenticator; } final Authenticator keystoreAuthenticator = OAuthUtils.buildAuthenticatorWithTruststore( - config.getKeyStore(), config.getKeyStorePassword().toCharArray(), config.getKeyIds()); + jwtConfig.getKeyStore(), jwtConfig.getKeyStorePassword().toCharArray(), jwtConfig.getKeyIds()); if (keystoreAuthenticator != null) { return keystoreAuthenticator; } - final Authenticator sharedKeyAuthenticator = OAuthUtils.buildAuthenticatorWithSharedSecret(config.getKey()); + final Authenticator sharedKeyAuthenticator = OAuthUtils.buildAuthenticatorWithSharedSecret(jwtConfig.getKey()); if (sharedKeyAuthenticator != null) { return sharedKeyAuthenticator; } + final WebIdOIDCConfiguration webIdOIDC = jwtConfig.getWebIdOIDC(); + final Authenticator webIdOIDCAuthenticator = + OAuthUtils.buildAuthenticatorWithWebIdOIDC(webIdOIDC.getEnabled(), config.getBaseUrl(), + webIdOIDC.getCacheSize(), webIdOIDC.getCacheExpireDays()); + if (webIdOIDCAuthenticator != null) { + return webIdOIDCAuthenticator; + } + return new NullAuthenticator(); } @@ -92,7 +100,7 @@ public static List getAuthFilters(final TrellisConfigura final Set admins = new HashSet<>(config.getAuth().getAdminUsers()); if (auth.getJwt().getEnabled()) { - filters.add(new OAuthFilter(getJwtAuthenticator(auth.getJwt()), realm, admins)); + filters.add(new OAuthFilter(getJwtAuthenticator(config), realm, admins)); } if (auth.getBasic().getEnabled() && auth.getBasic().getUsersFile() != null) { diff --git a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/AssetConfiguration.java b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/AssetConfiguration.java index 6bf4b9b3..876b6723 100644 --- a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/AssetConfiguration.java +++ b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/AssetConfiguration.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/AuthConfiguration.java b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/AuthConfiguration.java index b4981232..c9f15c5b 100644 --- a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/AuthConfiguration.java +++ b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/AuthConfiguration.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/BasicAuthConfiguration.java b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/BasicAuthConfiguration.java index 67816ab9..85b59dc7 100644 --- a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/BasicAuthConfiguration.java +++ b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/BasicAuthConfiguration.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/CORSConfiguration.java b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/CORSConfiguration.java index dcfb7f27..45b86b01 100644 --- a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/CORSConfiguration.java +++ b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/CORSConfiguration.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/CacheConfiguration.java b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/CacheConfiguration.java index b1341087..fb45ec4c 100644 --- a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/CacheConfiguration.java +++ b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/CacheConfiguration.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/JsonLdConfiguration.java b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/JsonLdConfiguration.java index 8d18d359..870e51e4 100644 --- a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/JsonLdConfiguration.java +++ b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/JsonLdConfiguration.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/JwtAuthConfiguration.java b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/JwtAuthConfiguration.java index 90781ea0..816cf2fd 100644 --- a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/JwtAuthConfiguration.java +++ b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/JwtAuthConfiguration.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -40,6 +42,8 @@ public class JwtAuthConfiguration { @NotNull private List keyIds = emptyList(); + private WebIdOIDCConfiguration webIdOIDC = new WebIdOIDCConfiguration(); + /** * Get whether basic authentication has been enabled. * @return true if basic auth is enabled; false otherwise @@ -147,4 +151,22 @@ public String getJwks() { public void setJwks(final String jwks) { this.jwks = jwks; } + + /** + * Get the WebId OIDC configuration. + * @return the configuration object + */ + @JsonProperty + public WebIdOIDCConfiguration getWebIdOIDC() { + return webIdOIDC; + } + + /** + * Set the WebId OIDC configuration. + * @param webIdOIDC the configuration object + */ + @JsonProperty + public void setWebIdOIDC(final WebIdOIDCConfiguration webIdOIDC) { + this.webIdOIDC = webIdOIDC; + } } diff --git a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/NotificationsConfiguration.java b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/NotificationsConfiguration.java index 8d4232de..042c7d42 100644 --- a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/NotificationsConfiguration.java +++ b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/NotificationsConfiguration.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/TrellisConfiguration.java b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/TrellisConfiguration.java index 13169a23..bfc0a9f7 100644 --- a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/TrellisConfiguration.java +++ b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/TrellisConfiguration.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/WebIdOIDCConfiguration.java b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/WebIdOIDCConfiguration.java new file mode 100644 index 00000000..3fac70e5 --- /dev/null +++ b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/WebIdOIDCConfiguration.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.trellisldp.dropwizard.config; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configuration for the WebId OIDC authenticator. + */ +public class WebIdOIDCConfiguration { + private boolean enabled = false; + private int cacheSize = 50; + private int cacheExpireDays = 30; + + /** + * Get whether WebId OIDC support is enabled. + * + * @return true if it is enabled + */ + @JsonProperty + public boolean getEnabled() { + return enabled; + } + + /** + * Enable or disable the WebId OIDC support. + * + * @param enabled true if it should be enabled + */ + @JsonProperty + public void setEnabled(final boolean enabled) { + this.enabled = enabled; + } + + /** + * Get maximum size of the provider key configuration cache. + * + * @return the size of the cache + */ + @JsonProperty + public int getCacheSize() { + return cacheSize; + } + + /** + * Set the size of the provider key configuration cache. + * + * @param cacheSize the size of the cache + */ + @JsonProperty + public void setCacheSize(final int cacheSize) { + this.cacheSize = cacheSize; + } + + /** + * Get the cache expire time in days. + * + * @return the number of days after which an element expires + */ + @JsonProperty + public int getCacheExpireDays() { + return cacheExpireDays; + } + + /** + * Set the cache expire time in days. + * + * @param cacheExpireDays the number of days after which an element expires + */ + @JsonProperty + public void setCacheExpireDays(final int cacheExpireDays) { + this.cacheExpireDays = cacheExpireDays; + } +} diff --git a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/WebacConfiguration.java b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/WebacConfiguration.java index 964df558..16a1fba9 100644 --- a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/WebacConfiguration.java +++ b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/WebacConfiguration.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/package-info.java b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/package-info.java index a5341eb8..105a2aac 100644 --- a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/package-info.java +++ b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/config/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/package-info.java b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/package-info.java index 71a92bab..ca29f307 100644 --- a/components/dropwizard/src/main/java/org/trellisldp/dropwizard/package-info.java +++ b/components/dropwizard/src/main/java/org/trellisldp/dropwizard/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/test/java/org/trellisldp/dropwizard/AnyOriginTest.java b/components/dropwizard/src/test/java/org/trellisldp/dropwizard/AnyOriginTest.java index 7f855875..8039009e 100644 --- a/components/dropwizard/src/test/java/org/trellisldp/dropwizard/AnyOriginTest.java +++ b/components/dropwizard/src/test/java/org/trellisldp/dropwizard/AnyOriginTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/test/java/org/trellisldp/dropwizard/NoInitTrellisApplicationTest.java b/components/dropwizard/src/test/java/org/trellisldp/dropwizard/NoInitTrellisApplicationTest.java index 9d1f9e83..667c2177 100644 --- a/components/dropwizard/src/test/java/org/trellisldp/dropwizard/NoInitTrellisApplicationTest.java +++ b/components/dropwizard/src/test/java/org/trellisldp/dropwizard/NoInitTrellisApplicationTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/test/java/org/trellisldp/dropwizard/SimpleNoInitTrellisApp.java b/components/dropwizard/src/test/java/org/trellisldp/dropwizard/SimpleNoInitTrellisApp.java index 137217ab..27d16452 100644 --- a/components/dropwizard/src/test/java/org/trellisldp/dropwizard/SimpleNoInitTrellisApp.java +++ b/components/dropwizard/src/test/java/org/trellisldp/dropwizard/SimpleNoInitTrellisApp.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/test/java/org/trellisldp/dropwizard/SimpleServiceBundler.java b/components/dropwizard/src/test/java/org/trellisldp/dropwizard/SimpleServiceBundler.java index 6f3d1379..e34cc60a 100644 --- a/components/dropwizard/src/test/java/org/trellisldp/dropwizard/SimpleServiceBundler.java +++ b/components/dropwizard/src/test/java/org/trellisldp/dropwizard/SimpleServiceBundler.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/test/java/org/trellisldp/dropwizard/SimpleTrellisApp.java b/components/dropwizard/src/test/java/org/trellisldp/dropwizard/SimpleTrellisApp.java index 76872972..145475f8 100644 --- a/components/dropwizard/src/test/java/org/trellisldp/dropwizard/SimpleTrellisApp.java +++ b/components/dropwizard/src/test/java/org/trellisldp/dropwizard/SimpleTrellisApp.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/test/java/org/trellisldp/dropwizard/SpecificOriginTest.java b/components/dropwizard/src/test/java/org/trellisldp/dropwizard/SpecificOriginTest.java index 476bfef3..c098303f 100644 --- a/components/dropwizard/src/test/java/org/trellisldp/dropwizard/SpecificOriginTest.java +++ b/components/dropwizard/src/test/java/org/trellisldp/dropwizard/SpecificOriginTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/test/java/org/trellisldp/dropwizard/TrellisApplicationTest.java b/components/dropwizard/src/test/java/org/trellisldp/dropwizard/TrellisApplicationTest.java index eaf2c7f3..cd05d057 100644 --- a/components/dropwizard/src/test/java/org/trellisldp/dropwizard/TrellisApplicationTest.java +++ b/components/dropwizard/src/test/java/org/trellisldp/dropwizard/TrellisApplicationTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/dropwizard/src/test/java/org/trellisldp/dropwizard/TrellisUtilsTest.java b/components/dropwizard/src/test/java/org/trellisldp/dropwizard/TrellisUtilsTest.java index 88e5845b..abf8cee4 100644 --- a/components/dropwizard/src/test/java/org/trellisldp/dropwizard/TrellisUtilsTest.java +++ b/components/dropwizard/src/test/java/org/trellisldp/dropwizard/TrellisUtilsTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -44,7 +46,9 @@ import org.trellisldp.auth.oauth.JwksAuthenticator; import org.trellisldp.auth.oauth.JwtAuthenticator; import org.trellisldp.auth.oauth.NullAuthenticator; +import org.trellisldp.auth.oauth.WebIdOIDCAuthenticator; import org.trellisldp.dropwizard.config.TrellisConfiguration; +import org.trellisldp.dropwizard.config.WebIdOIDCConfiguration; import org.trellisldp.vocabulary.Trellis; /** @@ -133,7 +137,7 @@ void testGetJwksAuthenticator() throws Exception { final TrellisConfiguration config = new YamlConfigurationFactory<>(TrellisConfiguration.class, Validators.newValidator(), Jackson.newMinimalObjectMapper(), "") .build(new File(getClass().getResource("/config1.yml").toURI())); - assertTrue(TrellisUtils.getJwtAuthenticator(config.getAuth().getJwt()) instanceof JwksAuthenticator, + assertTrue(TrellisUtils.getJwtAuthenticator(config) instanceof JwksAuthenticator, "JWT auth not enabled!"); } @@ -144,7 +148,7 @@ void testGetJwtAuthenticator() throws Exception { .build(new File(getClass().getResource("/config1.yml").toURI())); config.getAuth().getJwt().setJwks(null); config.getAuth().getJwt().setKeyStore(resourceFilePath("keystore.jks")); - assertTrue(TrellisUtils.getJwtAuthenticator(config.getAuth().getJwt()) instanceof JwtAuthenticator, + assertTrue(TrellisUtils.getJwtAuthenticator(config) instanceof JwtAuthenticator, "JWT auth not enabled!"); } @@ -156,7 +160,7 @@ void testGetJwtAuthenticatorNoKeyIds() throws Exception { config.getAuth().getJwt().setJwks(null); config.getAuth().getJwt().setKeyStore(resourceFilePath("keystore.jks")); config.getAuth().getJwt().setKeyIds(asList("foo", "bar")); - assertTrue(TrellisUtils.getJwtAuthenticator(config.getAuth().getJwt()) instanceof JwtAuthenticator, + assertTrue(TrellisUtils.getJwtAuthenticator(config) instanceof JwtAuthenticator, "JWT auth not disabled!"); } @@ -168,7 +172,7 @@ void testGetJwtAuthenticatorFederated() throws Exception { config.getAuth().getJwt().setJwks(null); config.getAuth().getJwt().setKeyStore(resourceFilePath("keystore.jks")); config.getAuth().getJwt().setKeyIds(asList("trellis", "trellis-ec", "trellis-public")); - assertTrue(TrellisUtils.getJwtAuthenticator(config.getAuth().getJwt()) instanceof FederatedJwtAuthenticator, + assertTrue(TrellisUtils.getJwtAuthenticator(config) instanceof FederatedJwtAuthenticator, "JWT auth not enabled!"); } @@ -179,7 +183,7 @@ void testGetJwtAuthenticatorBadKeystore() throws Exception { .build(new File(getClass().getResource("/config1.yml").toURI())); config.getAuth().getJwt().setJwks(null); config.getAuth().getJwt().setKeyStore(resourceFilePath("config1.yml")); - assertTrue(TrellisUtils.getJwtAuthenticator(config.getAuth().getJwt()) instanceof JwtAuthenticator, + assertTrue(TrellisUtils.getJwtAuthenticator(config) instanceof JwtAuthenticator, "JWT auth not disabled!"); } @@ -191,10 +195,25 @@ void testGetJwtAuthenticatorNoKeystore() throws Exception { final String nonexistent = resourceFilePath("config1.yml").replaceAll("config1.yml", "nonexistent.yml"); config.getAuth().getJwt().setJwks(null); config.getAuth().getJwt().setKeyStore(nonexistent); - assertTrue(TrellisUtils.getJwtAuthenticator(config.getAuth().getJwt()) instanceof JwtAuthenticator, + assertTrue(TrellisUtils.getJwtAuthenticator(config) instanceof JwtAuthenticator, "JWT auth not disabled!"); } + @Test + void testGetJwtAuthenticatorWebIdOIDC() throws Exception { + final TrellisConfiguration config = new YamlConfigurationFactory<>(TrellisConfiguration.class, + Validators.newValidator(), Jackson.newMinimalObjectMapper(), "") + .build(new File(getClass().getResource("/config1.yml").toURI())); + config.getAuth().getJwt().setKeyStore(null); + config.getAuth().getJwt().setKey(""); + config.getAuth().getJwt().setJwks(null); + final WebIdOIDCConfiguration webIdOIDC = new WebIdOIDCConfiguration(); + webIdOIDC.setEnabled(true); + config.getAuth().getJwt().setWebIdOIDC(webIdOIDC); + assertTrue(TrellisUtils.getJwtAuthenticator(config) instanceof WebIdOIDCAuthenticator, + "JWT WebId-OIDC Authenticator not enabled"); + } + @Test void testGetNoJwtAuthenticator() throws Exception { final TrellisConfiguration config = new YamlConfigurationFactory<>(TrellisConfiguration.class, @@ -203,7 +222,7 @@ void testGetNoJwtAuthenticator() throws Exception { config.getAuth().getJwt().setKeyStore(null); config.getAuth().getJwt().setKey(""); config.getAuth().getJwt().setJwks(null); - assertTrue(TrellisUtils.getJwtAuthenticator(config.getAuth().getJwt()) instanceof NullAuthenticator, - "JWT auth not disabled!"); + assertTrue(TrellisUtils.getJwtAuthenticator(config) instanceof NullAuthenticator, + "JWT auth not disabled"); } } diff --git a/components/dropwizard/src/test/java/org/trellisldp/dropwizard/config/TrellisConfigurationTest.java b/components/dropwizard/src/test/java/org/trellisldp/dropwizard/config/TrellisConfigurationTest.java index 62d1ac8c..e2829f8c 100644 --- a/components/dropwizard/src/test/java/org/trellisldp/dropwizard/config/TrellisConfigurationTest.java +++ b/components/dropwizard/src/test/java/org/trellisldp/dropwizard/config/TrellisConfigurationTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/file/build.gradle b/components/file/build.gradle index 762d6766..ae8245cf 100644 --- a/components/file/build.gradle +++ b/components/file/build.gradle @@ -29,7 +29,7 @@ dependencies { testImplementation "ch.qos.logback:logback-classic:$logbackVersion" testImplementation "jakarta.annotation:jakarta.annotation-api:$annotationApiVersion" testImplementation "org.mockito:mockito-core:$mockitoVersion" - testImplementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" } pitest { diff --git a/components/file/src/main/java/module-info.java b/components/file/src/main/java/module-info.java index 1f80e2b7..25456083 100644 --- a/components/file/src/main/java/module-info.java +++ b/components/file/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -25,7 +27,7 @@ requires org.apache.jena.arq; requires org.slf4j; requires jakarta.enterprise.cdi.api; - requires jakarta.inject.api; + requires jakarta.inject; requires microprofile.config.api; requires org.apache.commons.codec; requires org.apache.jena.core; diff --git a/components/file/src/main/java/org/trellisldp/file/FileBinary.java b/components/file/src/main/java/org/trellisldp/file/FileBinary.java index 2668e820..00705a65 100644 --- a/components/file/src/main/java/org/trellisldp/file/FileBinary.java +++ b/components/file/src/main/java/org/trellisldp/file/FileBinary.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.trellisldp.file; import java.io.File; diff --git a/components/file/src/main/java/org/trellisldp/file/FileBinaryService.java b/components/file/src/main/java/org/trellisldp/file/FileBinaryService.java index 2d671965..5cda660b 100644 --- a/components/file/src/main/java/org/trellisldp/file/FileBinaryService.java +++ b/components/file/src/main/java/org/trellisldp/file/FileBinaryService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/file/src/main/java/org/trellisldp/file/FileMementoService.java b/components/file/src/main/java/org/trellisldp/file/FileMementoService.java index 3fa896d0..61178a35 100644 --- a/components/file/src/main/java/org/trellisldp/file/FileMementoService.java +++ b/components/file/src/main/java/org/trellisldp/file/FileMementoService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/file/src/main/java/org/trellisldp/file/FileNamespaceService.java b/components/file/src/main/java/org/trellisldp/file/FileNamespaceService.java index 890b7685..f0608304 100644 --- a/components/file/src/main/java/org/trellisldp/file/FileNamespaceService.java +++ b/components/file/src/main/java/org/trellisldp/file/FileNamespaceService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/file/src/main/java/org/trellisldp/file/FileResource.java b/components/file/src/main/java/org/trellisldp/file/FileResource.java index 788b8f3c..239e6872 100644 --- a/components/file/src/main/java/org/trellisldp/file/FileResource.java +++ b/components/file/src/main/java/org/trellisldp/file/FileResource.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/file/src/main/java/org/trellisldp/file/FileUtils.java b/components/file/src/main/java/org/trellisldp/file/FileUtils.java index 56ac0e49..3608fe7d 100644 --- a/components/file/src/main/java/org/trellisldp/file/FileUtils.java +++ b/components/file/src/main/java/org/trellisldp/file/FileUtils.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/file/src/main/java/org/trellisldp/file/package-info.java b/components/file/src/main/java/org/trellisldp/file/package-info.java index a07d3da9..654227c4 100644 --- a/components/file/src/main/java/org/trellisldp/file/package-info.java +++ b/components/file/src/main/java/org/trellisldp/file/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * File-based service implementations for Trellis. * diff --git a/components/file/src/test/java/org/trellisldp/file/FileBinaryServiceTest.java b/components/file/src/test/java/org/trellisldp/file/FileBinaryServiceTest.java index 121923dd..22cb6e75 100644 --- a/components/file/src/test/java/org/trellisldp/file/FileBinaryServiceTest.java +++ b/components/file/src/test/java/org/trellisldp/file/FileBinaryServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/file/src/test/java/org/trellisldp/file/FileMementoServiceTest.java b/components/file/src/test/java/org/trellisldp/file/FileMementoServiceTest.java index 600732f1..59ceed4e 100644 --- a/components/file/src/test/java/org/trellisldp/file/FileMementoServiceTest.java +++ b/components/file/src/test/java/org/trellisldp/file/FileMementoServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/file/src/test/java/org/trellisldp/file/FileNamespaceServiceTest.java b/components/file/src/test/java/org/trellisldp/file/FileNamespaceServiceTest.java index e9f2fcda..2e0849cb 100644 --- a/components/file/src/test/java/org/trellisldp/file/FileNamespaceServiceTest.java +++ b/components/file/src/test/java/org/trellisldp/file/FileNamespaceServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/file/src/test/java/org/trellisldp/file/FileResourceTest.java b/components/file/src/test/java/org/trellisldp/file/FileResourceTest.java index 7431d896..6dcf0455 100644 --- a/components/file/src/test/java/org/trellisldp/file/FileResourceTest.java +++ b/components/file/src/test/java/org/trellisldp/file/FileResourceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/file/src/test/java/org/trellisldp/file/FileUtilsTest.java b/components/file/src/test/java/org/trellisldp/file/FileUtilsTest.java index 2006055a..1ca4515d 100644 --- a/components/file/src/test/java/org/trellisldp/file/FileUtilsTest.java +++ b/components/file/src/test/java/org/trellisldp/file/FileUtilsTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/io-jena/build.gradle b/components/io-jena/build.gradle index e4a2da6a..73df68a9 100644 --- a/components/io-jena/build.gradle +++ b/components/io-jena/build.gradle @@ -27,7 +27,7 @@ dependencies { testImplementation "ch.qos.logback:logback-classic:$logbackVersion" testImplementation "org.mockito:mockito-core:$mockitoVersion" - testImplementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" } pitest { diff --git a/components/io-jena/src/main/java/module-info.java b/components/io-jena/src/main/java/module-info.java index 4f996b7f..488d6604 100644 --- a/components/io-jena/src/main/java/module-info.java +++ b/components/io-jena/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -22,7 +24,7 @@ requires org.apache.commons.rdf.jena; requires org.apache.jena.arq; requires jakarta.enterprise.cdi.api; - requires jakarta.inject.api; + requires jakarta.inject; requires microprofile.config.api; requires org.slf4j; requires org.apache.jena.core; diff --git a/components/io-jena/src/main/java/org/trellisldp/io/JenaIOService.java b/components/io-jena/src/main/java/org/trellisldp/io/JenaIOService.java index 6286e436..6577e234 100644 --- a/components/io-jena/src/main/java/org/trellisldp/io/JenaIOService.java +++ b/components/io-jena/src/main/java/org/trellisldp/io/JenaIOService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/io-jena/src/main/java/org/trellisldp/io/NoopProfileCache.java b/components/io-jena/src/main/java/org/trellisldp/io/NoopProfileCache.java index 1ee177b2..016a59ba 100644 --- a/components/io-jena/src/main/java/org/trellisldp/io/NoopProfileCache.java +++ b/components/io-jena/src/main/java/org/trellisldp/io/NoopProfileCache.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/io-jena/src/main/java/org/trellisldp/io/package-info.java b/components/io-jena/src/main/java/org/trellisldp/io/package-info.java index d6825663..8a7d14ef 100644 --- a/components/io-jena/src/main/java/org/trellisldp/io/package-info.java +++ b/components/io-jena/src/main/java/org/trellisldp/io/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/io-jena/src/test/java/org/trellisldp/io/JenaIOServiceTest.java b/components/io-jena/src/test/java/org/trellisldp/io/JenaIOServiceTest.java index 52e26e35..a9f255ec 100644 --- a/components/io-jena/src/test/java/org/trellisldp/io/JenaIOServiceTest.java +++ b/components/io-jena/src/test/java/org/trellisldp/io/JenaIOServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/io-jena/src/test/java/org/trellisldp/io/NoopProfileCacheTest.java b/components/io-jena/src/test/java/org/trellisldp/io/NoopProfileCacheTest.java index c426491d..ca141ed0 100644 --- a/components/io-jena/src/test/java/org/trellisldp/io/NoopProfileCacheTest.java +++ b/components/io-jena/src/test/java/org/trellisldp/io/NoopProfileCacheTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.trellisldp.io; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/components/namespaces/build.gradle b/components/namespaces/build.gradle index 12ea75b2..2a237566 100644 --- a/components/namespaces/build.gradle +++ b/components/namespaces/build.gradle @@ -19,7 +19,7 @@ dependencies { implementation project(':trellis-vocabulary') testImplementation "ch.qos.logback:logback-classic:$logbackVersion" - testImplementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" testImplementation "org.apache.commons:commons-rdf-simple:$commonsRdfVersion" testImplementation "org.mockito:mockito-core:$mockitoVersion" } diff --git a/components/namespaces/src/main/java/module-info.java b/components/namespaces/src/main/java/module-info.java index 1c0ce2da..7536c709 100644 --- a/components/namespaces/src/main/java/module-info.java +++ b/components/namespaces/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -19,7 +21,7 @@ requires org.apache.commons.rdf.api; requires jakarta.enterprise.cdi.api; - requires jakarta.inject.api; + requires jakarta.inject; requires microprofile.config.api; requires org.slf4j; diff --git a/components/namespaces/src/main/java/org/trellisldp/namespaces/SimpleNamespaceService.java b/components/namespaces/src/main/java/org/trellisldp/namespaces/SimpleNamespaceService.java index 00b09e07..1758fad7 100644 --- a/components/namespaces/src/main/java/org/trellisldp/namespaces/SimpleNamespaceService.java +++ b/components/namespaces/src/main/java/org/trellisldp/namespaces/SimpleNamespaceService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/namespaces/src/main/java/org/trellisldp/namespaces/package-info.java b/components/namespaces/src/main/java/org/trellisldp/namespaces/package-info.java index 0736e440..b72ea079 100644 --- a/components/namespaces/src/main/java/org/trellisldp/namespaces/package-info.java +++ b/components/namespaces/src/main/java/org/trellisldp/namespaces/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/namespaces/src/test/java/org/trellisldp/namespaces/SimpleNamespaceServiceTest.java b/components/namespaces/src/test/java/org/trellisldp/namespaces/SimpleNamespaceServiceTest.java index 1f047689..d7771881 100644 --- a/components/namespaces/src/test/java/org/trellisldp/namespaces/SimpleNamespaceServiceTest.java +++ b/components/namespaces/src/test/java/org/trellisldp/namespaces/SimpleNamespaceServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/rdfa/build.gradle b/components/rdfa/build.gradle index 8fc77bb5..45adfa80 100644 --- a/components/rdfa/build.gradle +++ b/components/rdfa/build.gradle @@ -26,7 +26,7 @@ dependencies { } testImplementation "org.apache.jena:jena-arq:$jenaVersion" testImplementation "ch.qos.logback:logback-classic:$logbackVersion" - testImplementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" testImplementation "org.mockito:mockito-core:$mockitoVersion" } diff --git a/components/rdfa/src/main/java/module-info.java b/components/rdfa/src/main/java/module-info.java index ec7b9a1f..0728f0b5 100644 --- a/components/rdfa/src/main/java/module-info.java +++ b/components/rdfa/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -19,7 +21,7 @@ requires com.github.mustachejava; requires jakarta.enterprise.cdi.api; - requires jakarta.inject.api; + requires jakarta.inject; requires microprofile.config.api; requires org.apache.commons.rdf.api; requires org.apache.jena.arq; diff --git a/components/rdfa/src/main/java/org/trellisldp/rdfa/DefaultRdfaWriterService.java b/components/rdfa/src/main/java/org/trellisldp/rdfa/DefaultRdfaWriterService.java index ef5835c1..e26f1bd1 100644 --- a/components/rdfa/src/main/java/org/trellisldp/rdfa/DefaultRdfaWriterService.java +++ b/components/rdfa/src/main/java/org/trellisldp/rdfa/DefaultRdfaWriterService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/rdfa/src/main/java/org/trellisldp/rdfa/HtmlData.java b/components/rdfa/src/main/java/org/trellisldp/rdfa/HtmlData.java index 55c34551..0cf06632 100644 --- a/components/rdfa/src/main/java/org/trellisldp/rdfa/HtmlData.java +++ b/components/rdfa/src/main/java/org/trellisldp/rdfa/HtmlData.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/rdfa/src/main/java/org/trellisldp/rdfa/LabelledTriple.java b/components/rdfa/src/main/java/org/trellisldp/rdfa/LabelledTriple.java index 05252a89..8a91d8a4 100644 --- a/components/rdfa/src/main/java/org/trellisldp/rdfa/LabelledTriple.java +++ b/components/rdfa/src/main/java/org/trellisldp/rdfa/LabelledTriple.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/rdfa/src/main/java/org/trellisldp/rdfa/package-info.java b/components/rdfa/src/main/java/org/trellisldp/rdfa/package-info.java index 755bb535..5357d232 100644 --- a/components/rdfa/src/main/java/org/trellisldp/rdfa/package-info.java +++ b/components/rdfa/src/main/java/org/trellisldp/rdfa/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/rdfa/src/test/java/org/trellisldp/rdfa/DefaultRdfaWriterServiceTest.java b/components/rdfa/src/test/java/org/trellisldp/rdfa/DefaultRdfaWriterServiceTest.java index c62a1768..00dfa194 100644 --- a/components/rdfa/src/test/java/org/trellisldp/rdfa/DefaultRdfaWriterServiceTest.java +++ b/components/rdfa/src/test/java/org/trellisldp/rdfa/DefaultRdfaWriterServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/rdfa/src/test/java/org/trellisldp/rdfa/LabelledTripleTest.java b/components/rdfa/src/test/java/org/trellisldp/rdfa/LabelledTripleTest.java index ff2d32c0..3e4d0de0 100644 --- a/components/rdfa/src/test/java/org/trellisldp/rdfa/LabelledTripleTest.java +++ b/components/rdfa/src/test/java/org/trellisldp/rdfa/LabelledTripleTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/module-info.java b/components/test/src/main/java/module-info.java index ed101290..d32c54e6 100644 --- a/components/test/src/main/java/module-info.java +++ b/components/test/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -32,5 +34,5 @@ requires java.annotation; requires java.ws.rs; requires java.xml.bind; - requires jakarta.inject.api; + requires jakarta.inject; } diff --git a/components/test/src/main/java/org/trellisldp/test/AbstractApplicationAuditTests.java b/components/test/src/main/java/org/trellisldp/test/AbstractApplicationAuditTests.java index 5268223a..1b08e4c0 100644 --- a/components/test/src/main/java/org/trellisldp/test/AbstractApplicationAuditTests.java +++ b/components/test/src/main/java/org/trellisldp/test/AbstractApplicationAuditTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/AbstractApplicationAuthTests.java b/components/test/src/main/java/org/trellisldp/test/AbstractApplicationAuthTests.java index bfb5e85e..d29a1222 100644 --- a/components/test/src/main/java/org/trellisldp/test/AbstractApplicationAuthTests.java +++ b/components/test/src/main/java/org/trellisldp/test/AbstractApplicationAuthTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/AbstractApplicationEventTests.java b/components/test/src/main/java/org/trellisldp/test/AbstractApplicationEventTests.java index 31c01f88..0957b616 100644 --- a/components/test/src/main/java/org/trellisldp/test/AbstractApplicationEventTests.java +++ b/components/test/src/main/java/org/trellisldp/test/AbstractApplicationEventTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/AbstractApplicationLdpTests.java b/components/test/src/main/java/org/trellisldp/test/AbstractApplicationLdpTests.java index 405bad56..690c5a18 100644 --- a/components/test/src/main/java/org/trellisldp/test/AbstractApplicationLdpTests.java +++ b/components/test/src/main/java/org/trellisldp/test/AbstractApplicationLdpTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/AbstractApplicationMementoTests.java b/components/test/src/main/java/org/trellisldp/test/AbstractApplicationMementoTests.java index 5ca05cf2..9c4bc6f5 100644 --- a/components/test/src/main/java/org/trellisldp/test/AbstractApplicationMementoTests.java +++ b/components/test/src/main/java/org/trellisldp/test/AbstractApplicationMementoTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/AbstractResourceServiceTests.java b/components/test/src/main/java/org/trellisldp/test/AbstractResourceServiceTests.java index 34a3d59e..cb11b311 100644 --- a/components/test/src/main/java/org/trellisldp/test/AbstractResourceServiceTests.java +++ b/components/test/src/main/java/org/trellisldp/test/AbstractResourceServiceTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/AuditTests.java b/components/test/src/main/java/org/trellisldp/test/AuditTests.java index a36f27b0..89ea7208 100644 --- a/components/test/src/main/java/org/trellisldp/test/AuditTests.java +++ b/components/test/src/main/java/org/trellisldp/test/AuditTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/AuthAdministratorTests.java b/components/test/src/main/java/org/trellisldp/test/AuthAdministratorTests.java index 4b0c477c..3c12d871 100644 --- a/components/test/src/main/java/org/trellisldp/test/AuthAdministratorTests.java +++ b/components/test/src/main/java/org/trellisldp/test/AuthAdministratorTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/AuthAnonymousTests.java b/components/test/src/main/java/org/trellisldp/test/AuthAnonymousTests.java index d7497d5a..c31ab840 100644 --- a/components/test/src/main/java/org/trellisldp/test/AuthAnonymousTests.java +++ b/components/test/src/main/java/org/trellisldp/test/AuthAnonymousTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/AuthCommonTests.java b/components/test/src/main/java/org/trellisldp/test/AuthCommonTests.java index 9e3f987a..b6d6ee1d 100644 --- a/components/test/src/main/java/org/trellisldp/test/AuthCommonTests.java +++ b/components/test/src/main/java/org/trellisldp/test/AuthCommonTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/AuthOtherUserTests.java b/components/test/src/main/java/org/trellisldp/test/AuthOtherUserTests.java index 9ce17156..9dedd957 100644 --- a/components/test/src/main/java/org/trellisldp/test/AuthOtherUserTests.java +++ b/components/test/src/main/java/org/trellisldp/test/AuthOtherUserTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/AuthUserTests.java b/components/test/src/main/java/org/trellisldp/test/AuthUserTests.java index 8c85fbe2..f1afda5c 100644 --- a/components/test/src/main/java/org/trellisldp/test/AuthUserTests.java +++ b/components/test/src/main/java/org/trellisldp/test/AuthUserTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/CommonTests.java b/components/test/src/main/java/org/trellisldp/test/CommonTests.java index 99854e26..042eec67 100644 --- a/components/test/src/main/java/org/trellisldp/test/CommonTests.java +++ b/components/test/src/main/java/org/trellisldp/test/CommonTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/EventTests.java b/components/test/src/main/java/org/trellisldp/test/EventTests.java index fc4ebabe..f334d238 100644 --- a/components/test/src/main/java/org/trellisldp/test/EventTests.java +++ b/components/test/src/main/java/org/trellisldp/test/EventTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/InMemoryBinaryService.java b/components/test/src/main/java/org/trellisldp/test/InMemoryBinaryService.java index 44a64123..19a5a44c 100644 --- a/components/test/src/main/java/org/trellisldp/test/InMemoryBinaryService.java +++ b/components/test/src/main/java/org/trellisldp/test/InMemoryBinaryService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.trellisldp.test; import static java.util.Arrays.copyOfRange; diff --git a/components/test/src/main/java/org/trellisldp/test/InMemoryResourceService.java b/components/test/src/main/java/org/trellisldp/test/InMemoryResourceService.java index fe36472d..72afa1a2 100644 --- a/components/test/src/main/java/org/trellisldp/test/InMemoryResourceService.java +++ b/components/test/src/main/java/org/trellisldp/test/InMemoryResourceService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.trellisldp.test; import static java.time.Instant.now; diff --git a/components/test/src/main/java/org/trellisldp/test/LdpBasicContainerTests.java b/components/test/src/main/java/org/trellisldp/test/LdpBasicContainerTests.java index 95241163..75d16e86 100644 --- a/components/test/src/main/java/org/trellisldp/test/LdpBasicContainerTests.java +++ b/components/test/src/main/java/org/trellisldp/test/LdpBasicContainerTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/LdpBinaryTests.java b/components/test/src/main/java/org/trellisldp/test/LdpBinaryTests.java index 3126ca76..1e3fa7f5 100644 --- a/components/test/src/main/java/org/trellisldp/test/LdpBinaryTests.java +++ b/components/test/src/main/java/org/trellisldp/test/LdpBinaryTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/LdpDirectContainerTests.java b/components/test/src/main/java/org/trellisldp/test/LdpDirectContainerTests.java index c8810cf6..670f6316 100644 --- a/components/test/src/main/java/org/trellisldp/test/LdpDirectContainerTests.java +++ b/components/test/src/main/java/org/trellisldp/test/LdpDirectContainerTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/LdpIndirectContainerTests.java b/components/test/src/main/java/org/trellisldp/test/LdpIndirectContainerTests.java index 3489ad0c..6ed59ec3 100644 --- a/components/test/src/main/java/org/trellisldp/test/LdpIndirectContainerTests.java +++ b/components/test/src/main/java/org/trellisldp/test/LdpIndirectContainerTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/LdpRdfTests.java b/components/test/src/main/java/org/trellisldp/test/LdpRdfTests.java index 6e6a2051..36925834 100644 --- a/components/test/src/main/java/org/trellisldp/test/LdpRdfTests.java +++ b/components/test/src/main/java/org/trellisldp/test/LdpRdfTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/MementoBinaryTests.java b/components/test/src/main/java/org/trellisldp/test/MementoBinaryTests.java index fbf804b5..17af5035 100644 --- a/components/test/src/main/java/org/trellisldp/test/MementoBinaryTests.java +++ b/components/test/src/main/java/org/trellisldp/test/MementoBinaryTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/MementoCommonTests.java b/components/test/src/main/java/org/trellisldp/test/MementoCommonTests.java index c7217f58..99ff7502 100644 --- a/components/test/src/main/java/org/trellisldp/test/MementoCommonTests.java +++ b/components/test/src/main/java/org/trellisldp/test/MementoCommonTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/MementoResourceTests.java b/components/test/src/main/java/org/trellisldp/test/MementoResourceTests.java index 18de6695..bc962c78 100644 --- a/components/test/src/main/java/org/trellisldp/test/MementoResourceTests.java +++ b/components/test/src/main/java/org/trellisldp/test/MementoResourceTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/MementoTimeGateTests.java b/components/test/src/main/java/org/trellisldp/test/MementoTimeGateTests.java index 39f734bc..cb2be58a 100644 --- a/components/test/src/main/java/org/trellisldp/test/MementoTimeGateTests.java +++ b/components/test/src/main/java/org/trellisldp/test/MementoTimeGateTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/MementoTimeMapTests.java b/components/test/src/main/java/org/trellisldp/test/MementoTimeMapTests.java index 120d40ed..83ece6b9 100644 --- a/components/test/src/main/java/org/trellisldp/test/MementoTimeMapTests.java +++ b/components/test/src/main/java/org/trellisldp/test/MementoTimeMapTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/ResourceServiceTests.java b/components/test/src/main/java/org/trellisldp/test/ResourceServiceTests.java index a94f458d..76ba14d6 100644 --- a/components/test/src/main/java/org/trellisldp/test/ResourceServiceTests.java +++ b/components/test/src/main/java/org/trellisldp/test/ResourceServiceTests.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/TestUtils.java b/components/test/src/main/java/org/trellisldp/test/TestUtils.java index a8659426..ab0948b0 100644 --- a/components/test/src/main/java/org/trellisldp/test/TestUtils.java +++ b/components/test/src/main/java/org/trellisldp/test/TestUtils.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/main/java/org/trellisldp/test/package-info.java b/components/test/src/main/java/org/trellisldp/test/package-info.java index c6b2db1b..23c571ae 100644 --- a/components/test/src/main/java/org/trellisldp/test/package-info.java +++ b/components/test/src/main/java/org/trellisldp/test/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/test/src/test/java/org/trellisldp/test/InMemoryBinaryServiceTest.java b/components/test/src/test/java/org/trellisldp/test/InMemoryBinaryServiceTest.java index 9f715e3a..9527fc94 100644 --- a/components/test/src/test/java/org/trellisldp/test/InMemoryBinaryServiceTest.java +++ b/components/test/src/test/java/org/trellisldp/test/InMemoryBinaryServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.trellisldp.test; import static org.apache.commons.io.IOUtils.toByteArray; diff --git a/components/test/src/test/java/org/trellisldp/test/InMemoryResourceServiceTest.java b/components/test/src/test/java/org/trellisldp/test/InMemoryResourceServiceTest.java index e8bc998e..408935d0 100644 --- a/components/test/src/test/java/org/trellisldp/test/InMemoryResourceServiceTest.java +++ b/components/test/src/test/java/org/trellisldp/test/InMemoryResourceServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.trellisldp.test; import org.trellisldp.api.ResourceService; diff --git a/components/test/src/test/java/org/trellisldp/test/TestUtilsTest.java b/components/test/src/test/java/org/trellisldp/test/TestUtilsTest.java index 6a72c077..65e996b5 100644 --- a/components/test/src/test/java/org/trellisldp/test/TestUtilsTest.java +++ b/components/test/src/test/java/org/trellisldp/test/TestUtilsTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/triplestore/build.gradle b/components/triplestore/build.gradle index 2f9948a5..69a73284 100644 --- a/components/triplestore/build.gradle +++ b/components/triplestore/build.gradle @@ -28,7 +28,7 @@ dependencies { implementation project(':trellis-vocabulary') testImplementation "ch.qos.logback:logback-classic:$logbackVersion" - testImplementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" testImplementation("io.smallrye:smallrye-health:$smallryeHealthVersion") { exclude group: 'io.smallrye', module: 'smallrye-health-extension-api' } diff --git a/components/triplestore/src/main/java/module-info.java b/components/triplestore/src/main/java/module-info.java index a717f4a4..cf957efd 100644 --- a/components/triplestore/src/main/java/module-info.java +++ b/components/triplestore/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -24,7 +26,7 @@ requires org.slf4j; requires jakarta.enterprise.cdi.api; - requires jakarta.inject.api; + requires jakarta.inject; requires java.annotation; requires microprofile.config.api; requires microprofile.health.api; diff --git a/components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreHealthCheck.java b/components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreHealthCheck.java index 457bc4aa..507aec47 100644 --- a/components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreHealthCheck.java +++ b/components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreHealthCheck.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreResource.java b/components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreResource.java index 3db7cb6c..4b493859 100644 --- a/components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreResource.java +++ b/components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreResource.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreResourceService.java b/components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreResourceService.java index 573f31ab..c2033089 100644 --- a/components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreResourceService.java +++ b/components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreResourceService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreUtils.java b/components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreUtils.java index 44e9e869..573fbdc4 100644 --- a/components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreUtils.java +++ b/components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreUtils.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/triplestore/src/main/java/org/trellisldp/triplestore/package-info.java b/components/triplestore/src/main/java/org/trellisldp/triplestore/package-info.java index 455caf9b..5c5fe391 100644 --- a/components/triplestore/src/main/java/org/trellisldp/triplestore/package-info.java +++ b/components/triplestore/src/main/java/org/trellisldp/triplestore/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * Trellis ResourceService implementation using a Triplestore. * diff --git a/components/triplestore/src/test/java/org/trellisldp/triplestore/ResourceServiceTest.java b/components/triplestore/src/test/java/org/trellisldp/triplestore/ResourceServiceTest.java index d75a52ca..60713ed4 100644 --- a/components/triplestore/src/test/java/org/trellisldp/triplestore/ResourceServiceTest.java +++ b/components/triplestore/src/test/java/org/trellisldp/triplestore/ResourceServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/triplestore/src/test/java/org/trellisldp/triplestore/TriplestoreHealthCheckTest.java b/components/triplestore/src/test/java/org/trellisldp/triplestore/TriplestoreHealthCheckTest.java index 61040d3e..f20c0c61 100644 --- a/components/triplestore/src/test/java/org/trellisldp/triplestore/TriplestoreHealthCheckTest.java +++ b/components/triplestore/src/test/java/org/trellisldp/triplestore/TriplestoreHealthCheckTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/triplestore/src/test/java/org/trellisldp/triplestore/TriplestoreResourceServiceTest.java b/components/triplestore/src/test/java/org/trellisldp/triplestore/TriplestoreResourceServiceTest.java index e3d0e881..2fad9616 100644 --- a/components/triplestore/src/test/java/org/trellisldp/triplestore/TriplestoreResourceServiceTest.java +++ b/components/triplestore/src/test/java/org/trellisldp/triplestore/TriplestoreResourceServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/triplestore/src/test/java/org/trellisldp/triplestore/TriplestoreResourceTest.java b/components/triplestore/src/test/java/org/trellisldp/triplestore/TriplestoreResourceTest.java index 16376dae..5aa732a6 100644 --- a/components/triplestore/src/test/java/org/trellisldp/triplestore/TriplestoreResourceTest.java +++ b/components/triplestore/src/test/java/org/trellisldp/triplestore/TriplestoreResourceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/triplestore/src/test/java/org/trellisldp/triplestore/TriplestoreUtilsTest.java b/components/triplestore/src/test/java/org/trellisldp/triplestore/TriplestoreUtilsTest.java index ec7f4d0f..b61c5a59 100644 --- a/components/triplestore/src/test/java/org/trellisldp/triplestore/TriplestoreUtilsTest.java +++ b/components/triplestore/src/test/java/org/trellisldp/triplestore/TriplestoreUtilsTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webac/build.gradle b/components/webac/build.gradle index 935b8876..0b597168 100644 --- a/components/webac/build.gradle +++ b/components/webac/build.gradle @@ -31,7 +31,7 @@ dependencies { implementation project(':trellis-vocabulary') testImplementation "ch.qos.logback:logback-classic:$logbackVersion" - testImplementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" testImplementation "org.glassfish.jersey.core:jersey-server:$jerseyVersion" testImplementation "org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:$jerseyVersion" testImplementation "org.mockito:mockito-core:$mockitoVersion" diff --git a/components/webac/src/main/java/module-info.java b/components/webac/src/main/java/module-info.java index 7d8d9b3d..e7598e91 100644 --- a/components/webac/src/main/java/module-info.java +++ b/components/webac/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -22,7 +24,7 @@ requires org.slf4j; requires jakarta.enterprise.cdi.api; - requires jakarta.inject.api; + requires jakarta.inject; requires java.annotation; requires java.xml.bind; requires java.ws.rs; diff --git a/components/webac/src/main/java/org/trellisldp/webac/Authorization.java b/components/webac/src/main/java/org/trellisldp/webac/Authorization.java index 579c8a27..62695f2e 100644 --- a/components/webac/src/main/java/org/trellisldp/webac/Authorization.java +++ b/components/webac/src/main/java/org/trellisldp/webac/Authorization.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webac/src/main/java/org/trellisldp/webac/WebAcFilter.java b/components/webac/src/main/java/org/trellisldp/webac/WebAcFilter.java index 36e6d3cf..9347ff0a 100644 --- a/components/webac/src/main/java/org/trellisldp/webac/WebAcFilter.java +++ b/components/webac/src/main/java/org/trellisldp/webac/WebAcFilter.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webac/src/main/java/org/trellisldp/webac/WebAcService.java b/components/webac/src/main/java/org/trellisldp/webac/WebAcService.java index 29327ecd..2ec08a45 100644 --- a/components/webac/src/main/java/org/trellisldp/webac/WebAcService.java +++ b/components/webac/src/main/java/org/trellisldp/webac/WebAcService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -397,14 +399,16 @@ static Dataset generateDefaultRootAuthorizationsDataset(final String resource) { final Model model = createDefaultModel(); try (final InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(resource)) { if (is != null) { + LOGGER.debug("Using classpath resource for default root ACL: {}", resource); RDFParser.source(is).lang(TURTLE).base(TRELLIS_DATA_PREFIX).parse(model); - rdf.asGraph(model).stream().map(triple -> rdf.createQuad(Trellis.PreferAccessControl, - triple.getSubject(), triple.getPredicate(), triple.getObject())).forEach(dataset::add); } else { - LOGGER.warn("Could not locate ACL location at {}, falling back to system default", resource); + LOGGER.debug("Using external resource for default root ACL: {}", resource); + RDFParser.source(resource).lang(TURTLE).base(TRELLIS_DATA_PREFIX).parse(model); } + rdf.asGraph(model).stream().map(triple -> rdf.createQuad(Trellis.PreferAccessControl, + triple.getSubject(), triple.getPredicate(), triple.getObject())).forEach(dataset::add); } catch (final IOException | RiotException ex) { - LOGGER.warn("Could initialize root ACL with {}, falling back to default: {}", resource, ex.getMessage()); + LOGGER.warn("Couldn't initialize root ACL with {}, falling back to default: {}", resource, ex.getMessage()); } finally { model.close(); } diff --git a/components/webac/src/main/java/org/trellisldp/webac/package-info.java b/components/webac/src/main/java/org/trellisldp/webac/package-info.java index a93a093f..7321971e 100644 --- a/components/webac/src/main/java/org/trellisldp/webac/package-info.java +++ b/components/webac/src/main/java/org/trellisldp/webac/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webac/src/test/java/org/trellisldp/webac/AuthorizationTest.java b/components/webac/src/test/java/org/trellisldp/webac/AuthorizationTest.java index 09691d98..95b4285c 100644 --- a/components/webac/src/test/java/org/trellisldp/webac/AuthorizationTest.java +++ b/components/webac/src/test/java/org/trellisldp/webac/AuthorizationTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webac/src/test/java/org/trellisldp/webac/WebAcFilterTest.java b/components/webac/src/test/java/org/trellisldp/webac/WebAcFilterTest.java index 50ccb63e..c95fb0a3 100644 --- a/components/webac/src/test/java/org/trellisldp/webac/WebAcFilterTest.java +++ b/components/webac/src/test/java/org/trellisldp/webac/WebAcFilterTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webac/src/test/java/org/trellisldp/webac/WebAcServiceTest.java b/components/webac/src/test/java/org/trellisldp/webac/WebAcServiceTest.java index 6f9f48b2..9645ed17 100644 --- a/components/webac/src/test/java/org/trellisldp/webac/WebAcServiceTest.java +++ b/components/webac/src/test/java/org/trellisldp/webac/WebAcServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -775,6 +777,22 @@ void testGenerateDefaultRootAclBadResource() throws Exception { } } + @Test + void testGenerateDefaultRootAclCustomExternalResource() throws Exception { + final String resource = WebAcServiceTest.class.getResource("/customAcl.ttl").getFile(); + final IRI rootAuth = rdf.createIRI(TRELLIS_DATA_PREFIX + "#auth"); + try (final Dataset dataset = WebAcService.generateDefaultRootAuthorizationsDataset(resource)) { + assertEquals(4L, dataset.size()); + assertTrue(dataset.contains(of(PreferAccessControl), rootAuth, ACL.mode, ACL.Read)); + assertTrue(dataset.contains(of(PreferAccessControl), rootAuth, ACL.default_, rootIRI)); + assertTrue(dataset.contains(of(PreferAccessControl), rootAuth, ACL.accessTo, rootIRI)); + assertTrue(dataset.contains(of(PreferAccessControl), rootAuth, ACL.agentClass, FOAF.Agent)); + assertFalse(dataset.contains(of(PreferAccessControl), rootAuth, ACL.mode, ACL.Write)); + assertFalse(dataset.contains(of(PreferAccessControl), rootAuth, ACL.mode, ACL.Append)); + assertFalse(dataset.contains(of(PreferAccessControl), rootAuth, ACL.mode, ACL.Control)); + } + } + @Test void testGenerateDefaultRootAclCustomResource() throws Exception { final String resource = "customAcl.ttl"; diff --git a/components/webdav/build.gradle b/components/webdav/build.gradle index 7f5b9b44..3ba7ba7a 100644 --- a/components/webdav/build.gradle +++ b/components/webdav/build.gradle @@ -28,7 +28,7 @@ dependencies { implementation project(':trellis-http') implementation project(':trellis-vocabulary') - testImplementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" testImplementation "org.apache.commons:commons-rdf-simple:$commonsRdfVersion" testImplementation "org.glassfish.jersey.core:jersey-server:$jerseyVersion" testImplementation "org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:$jerseyVersion" diff --git a/components/webdav/src/main/java/module-info.java b/components/webdav/src/main/java/module-info.java index b56852fe..1316b544 100644 --- a/components/webdav/src/main/java/module-info.java +++ b/components/webdav/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -27,7 +29,7 @@ requires microprofile.config.api; requires jakarta.enterprise.cdi.api; - requires jakarta.inject.api; + requires jakarta.inject; requires java.annotation; requires java.ws.rs; requires java.xml.bind; diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/COPY.java b/components/webdav/src/main/java/org/trellisldp/webdav/COPY.java index aa4c816d..19b555b8 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/COPY.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/COPY.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/Depth.java b/components/webdav/src/main/java/org/trellisldp/webdav/Depth.java index 71d17648..cc36c422 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/Depth.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/Depth.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/MOVE.java b/components/webdav/src/main/java/org/trellisldp/webdav/MOVE.java index 3c28f1e7..9d457938 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/MOVE.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/MOVE.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/PROPFIND.java b/components/webdav/src/main/java/org/trellisldp/webdav/PROPFIND.java index d3d79f24..d2e80152 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/PROPFIND.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/PROPFIND.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/PROPPATCH.java b/components/webdav/src/main/java/org/trellisldp/webdav/PROPPATCH.java index 71b8f42b..a261452a 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/PROPPATCH.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/PROPPATCH.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/TrellisWebDAV.java b/components/webdav/src/main/java/org/trellisldp/webdav/TrellisWebDAV.java index 6b5ace0f..503bb9cf 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/TrellisWebDAV.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/TrellisWebDAV.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/TrellisWebDAVRequestFilter.java b/components/webdav/src/main/java/org/trellisldp/webdav/TrellisWebDAVRequestFilter.java index 2cd41a96..1f27e01e 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/TrellisWebDAVRequestFilter.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/TrellisWebDAVRequestFilter.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/TrellisWebDAVResponseFilter.java b/components/webdav/src/main/java/org/trellisldp/webdav/TrellisWebDAVResponseFilter.java index 43572437..61ac2b57 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/TrellisWebDAVResponseFilter.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/TrellisWebDAVResponseFilter.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/impl/WebDAVUtils.java b/components/webdav/src/main/java/org/trellisldp/webdav/impl/WebDAVUtils.java index 23a2e305..9a715b8c 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/impl/WebDAVUtils.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/impl/WebDAVUtils.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/impl/package-info.java b/components/webdav/src/main/java/org/trellisldp/webdav/impl/package-info.java index 745e7bae..6233f8fe 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/impl/package-info.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/impl/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * Internal classes for the WebDAV implementations for Trellis. * diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/package-info.java b/components/webdav/src/main/java/org/trellisldp/webdav/package-info.java index 63ca8de4..5b4abfb3 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/package-info.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * WebDAV API implementation for Trellis. * diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavAllProp.java b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavAllProp.java index 34f33206..c389fcd2 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavAllProp.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavAllProp.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavMultiStatus.java b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavMultiStatus.java index 7467d0b5..a28fa1f9 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavMultiStatus.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavMultiStatus.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavProp.java b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavProp.java index 525b9d9f..a756bcee 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavProp.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavProp.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavPropFind.java b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavPropFind.java index 7e7ef24c..2992bf3b 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavPropFind.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavPropFind.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavPropName.java b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavPropName.java index 75006b49..09eeec3a 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavPropName.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavPropName.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavPropStat.java b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavPropStat.java index 86384f67..8e973255 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavPropStat.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavPropStat.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavPropertyUpdate.java b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavPropertyUpdate.java index 690662d2..4e96f1a0 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavPropertyUpdate.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavPropertyUpdate.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavRemove.java b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavRemove.java index fb448ba6..cd516e80 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavRemove.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavRemove.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavResponse.java b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavResponse.java index 3b712836..1459f03a 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavResponse.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavResponse.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavSet.java b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavSet.java index 6e540542..dc7b72d4 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavSet.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavSet.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavUtils.java b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavUtils.java index 6b3a7516..b1611ef9 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavUtils.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/xml/DavUtils.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/main/java/org/trellisldp/webdav/xml/package-info.java b/components/webdav/src/main/java/org/trellisldp/webdav/xml/package-info.java index d52d79bd..63fb6d37 100644 --- a/components/webdav/src/main/java/org/trellisldp/webdav/xml/package-info.java +++ b/components/webdav/src/main/java/org/trellisldp/webdav/xml/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * WebDAV XML API implementation for Trellis. * diff --git a/components/webdav/src/test/java/org/trellisldp/webdav/AbstractWebDAVTest.java b/components/webdav/src/test/java/org/trellisldp/webdav/AbstractWebDAVTest.java index 66e673ab..36e92095 100644 --- a/components/webdav/src/test/java/org/trellisldp/webdav/AbstractWebDAVTest.java +++ b/components/webdav/src/test/java/org/trellisldp/webdav/AbstractWebDAVTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/test/java/org/trellisldp/webdav/DebugExceptionMapper.java b/components/webdav/src/test/java/org/trellisldp/webdav/DebugExceptionMapper.java index 79b6b4c4..1c9e6337 100644 --- a/components/webdav/src/test/java/org/trellisldp/webdav/DebugExceptionMapper.java +++ b/components/webdav/src/test/java/org/trellisldp/webdav/DebugExceptionMapper.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/test/java/org/trellisldp/webdav/DepthTest.java b/components/webdav/src/test/java/org/trellisldp/webdav/DepthTest.java index 02c0e3d2..a535ab85 100644 --- a/components/webdav/src/test/java/org/trellisldp/webdav/DepthTest.java +++ b/components/webdav/src/test/java/org/trellisldp/webdav/DepthTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/test/java/org/trellisldp/webdav/TrellisWebDAVRequestFilterTest.java b/components/webdav/src/test/java/org/trellisldp/webdav/TrellisWebDAVRequestFilterTest.java index fd58fab3..cf44d86b 100644 --- a/components/webdav/src/test/java/org/trellisldp/webdav/TrellisWebDAVRequestFilterTest.java +++ b/components/webdav/src/test/java/org/trellisldp/webdav/TrellisWebDAVRequestFilterTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/test/java/org/trellisldp/webdav/WebDAVNoBaseUrlTest.java b/components/webdav/src/test/java/org/trellisldp/webdav/WebDAVNoBaseUrlTest.java index c204c557..d83b132a 100644 --- a/components/webdav/src/test/java/org/trellisldp/webdav/WebDAVNoBaseUrlTest.java +++ b/components/webdav/src/test/java/org/trellisldp/webdav/WebDAVNoBaseUrlTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/test/java/org/trellisldp/webdav/WebDAVTest.java b/components/webdav/src/test/java/org/trellisldp/webdav/WebDAVTest.java index 03b0bf18..ed12e146 100644 --- a/components/webdav/src/test/java/org/trellisldp/webdav/WebDAVTest.java +++ b/components/webdav/src/test/java/org/trellisldp/webdav/WebDAVTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/components/webdav/src/test/java/org/trellisldp/webdav/impl/WebDAVUtilsTest.java b/components/webdav/src/test/java/org/trellisldp/webdav/impl/WebDAVUtilsTest.java index be2c5541..0fca82bf 100644 --- a/components/webdav/src/test/java/org/trellisldp/webdav/impl/WebDAVUtilsTest.java +++ b/components/webdav/src/test/java/org/trellisldp/webdav/impl/WebDAVUtilsTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/build.gradle b/core/api/build.gradle index 27abdbba..4bb7115b 100644 --- a/core/api/build.gradle +++ b/core/api/build.gradle @@ -13,6 +13,7 @@ ext { dependencies { api "org.apache.commons:commons-rdf-api:$commonsRdfVersion" + api "jakarta.inject:jakarta.inject-api:$injectApiVersion" api "jakarta.enterprise:jakarta.enterprise.cdi-api:$cdiApiVersion" testImplementation "commons-io:commons-io:$commonsIoVersion" diff --git a/core/api/src/main/java/module-info.java b/core/api/src/main/java/module-info.java index 3706838d..fbdfb83e 100644 --- a/core/api/src/main/java/module-info.java +++ b/core/api/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,7 +17,7 @@ exports org.trellisldp.api; requires org.apache.commons.rdf.api; - requires jakarta.inject.api; + requires jakarta.inject; requires jakarta.enterprise.cdi.api; uses org.apache.commons.rdf.api.RDF; diff --git a/core/api/src/main/java/org/trellisldp/api/AuditService.java b/core/api/src/main/java/org/trellisldp/api/AuditService.java index 308a6ddf..a0d8692e 100644 --- a/core/api/src/main/java/org/trellisldp/api/AuditService.java +++ b/core/api/src/main/java/org/trellisldp/api/AuditService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/Binary.java b/core/api/src/main/java/org/trellisldp/api/Binary.java index 3ab8adc5..d38d0e01 100644 --- a/core/api/src/main/java/org/trellisldp/api/Binary.java +++ b/core/api/src/main/java/org/trellisldp/api/Binary.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.trellisldp.api; import java.io.InputStream; diff --git a/core/api/src/main/java/org/trellisldp/api/BinaryMetadata.java b/core/api/src/main/java/org/trellisldp/api/BinaryMetadata.java index 066c0ba5..3ae70f1f 100644 --- a/core/api/src/main/java/org/trellisldp/api/BinaryMetadata.java +++ b/core/api/src/main/java/org/trellisldp/api/BinaryMetadata.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/BinaryService.java b/core/api/src/main/java/org/trellisldp/api/BinaryService.java index 6e0fb666..1ecbdc54 100644 --- a/core/api/src/main/java/org/trellisldp/api/BinaryService.java +++ b/core/api/src/main/java/org/trellisldp/api/BinaryService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/CacheService.java b/core/api/src/main/java/org/trellisldp/api/CacheService.java index 02c81dfd..38caca46 100644 --- a/core/api/src/main/java/org/trellisldp/api/CacheService.java +++ b/core/api/src/main/java/org/trellisldp/api/CacheService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/ConstraintService.java b/core/api/src/main/java/org/trellisldp/api/ConstraintService.java index f7b55eaa..d0e518b0 100644 --- a/core/api/src/main/java/org/trellisldp/api/ConstraintService.java +++ b/core/api/src/main/java/org/trellisldp/api/ConstraintService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/ConstraintViolation.java b/core/api/src/main/java/org/trellisldp/api/ConstraintViolation.java index 0f5ceff2..f0c3d392 100644 --- a/core/api/src/main/java/org/trellisldp/api/ConstraintViolation.java +++ b/core/api/src/main/java/org/trellisldp/api/ConstraintViolation.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/DefaultIdentifierService.java b/core/api/src/main/java/org/trellisldp/api/DefaultIdentifierService.java index 0094e539..9dfc8277 100644 --- a/core/api/src/main/java/org/trellisldp/api/DefaultIdentifierService.java +++ b/core/api/src/main/java/org/trellisldp/api/DefaultIdentifierService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/Event.java b/core/api/src/main/java/org/trellisldp/api/Event.java index 572d6b3e..e94ba3a0 100644 --- a/core/api/src/main/java/org/trellisldp/api/Event.java +++ b/core/api/src/main/java/org/trellisldp/api/Event.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/EventSerializationService.java b/core/api/src/main/java/org/trellisldp/api/EventSerializationService.java index 8e240006..3376cd00 100644 --- a/core/api/src/main/java/org/trellisldp/api/EventSerializationService.java +++ b/core/api/src/main/java/org/trellisldp/api/EventSerializationService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/EventService.java b/core/api/src/main/java/org/trellisldp/api/EventService.java index adec92a5..106d96bd 100644 --- a/core/api/src/main/java/org/trellisldp/api/EventService.java +++ b/core/api/src/main/java/org/trellisldp/api/EventService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/IOService.java b/core/api/src/main/java/org/trellisldp/api/IOService.java index b633ae8e..52753cd0 100644 --- a/core/api/src/main/java/org/trellisldp/api/IOService.java +++ b/core/api/src/main/java/org/trellisldp/api/IOService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/IdentifierService.java b/core/api/src/main/java/org/trellisldp/api/IdentifierService.java index 38a41ec5..400e6760 100644 --- a/core/api/src/main/java/org/trellisldp/api/IdentifierService.java +++ b/core/api/src/main/java/org/trellisldp/api/IdentifierService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/MementoService.java b/core/api/src/main/java/org/trellisldp/api/MementoService.java index 7a1ba556..8ecbc4ff 100644 --- a/core/api/src/main/java/org/trellisldp/api/MementoService.java +++ b/core/api/src/main/java/org/trellisldp/api/MementoService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/Metadata.java b/core/api/src/main/java/org/trellisldp/api/Metadata.java index fe971924..af00616d 100644 --- a/core/api/src/main/java/org/trellisldp/api/Metadata.java +++ b/core/api/src/main/java/org/trellisldp/api/Metadata.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/NamespaceService.java b/core/api/src/main/java/org/trellisldp/api/NamespaceService.java index b50191d8..717d1a4e 100644 --- a/core/api/src/main/java/org/trellisldp/api/NamespaceService.java +++ b/core/api/src/main/java/org/trellisldp/api/NamespaceService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/NoopAuditService.java b/core/api/src/main/java/org/trellisldp/api/NoopAuditService.java index 446d87ac..ddd08745 100644 --- a/core/api/src/main/java/org/trellisldp/api/NoopAuditService.java +++ b/core/api/src/main/java/org/trellisldp/api/NoopAuditService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.trellisldp.api; /** diff --git a/core/api/src/main/java/org/trellisldp/api/NoopCacheService.java b/core/api/src/main/java/org/trellisldp/api/NoopCacheService.java index 34b6e0a4..d89db3f9 100644 --- a/core/api/src/main/java/org/trellisldp/api/NoopCacheService.java +++ b/core/api/src/main/java/org/trellisldp/api/NoopCacheService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/NoopEventSerializationService.java b/core/api/src/main/java/org/trellisldp/api/NoopEventSerializationService.java index 7191ba8d..d6a301fd 100644 --- a/core/api/src/main/java/org/trellisldp/api/NoopEventSerializationService.java +++ b/core/api/src/main/java/org/trellisldp/api/NoopEventSerializationService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/NoopEventService.java b/core/api/src/main/java/org/trellisldp/api/NoopEventService.java index 409c1f85..02d37019 100644 --- a/core/api/src/main/java/org/trellisldp/api/NoopEventService.java +++ b/core/api/src/main/java/org/trellisldp/api/NoopEventService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/NoopImplementation.java b/core/api/src/main/java/org/trellisldp/api/NoopImplementation.java index 40bb1155..43456de9 100644 --- a/core/api/src/main/java/org/trellisldp/api/NoopImplementation.java +++ b/core/api/src/main/java/org/trellisldp/api/NoopImplementation.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/NoopMementoService.java b/core/api/src/main/java/org/trellisldp/api/NoopMementoService.java index 051e44fa..d3d3b24c 100644 --- a/core/api/src/main/java/org/trellisldp/api/NoopMementoService.java +++ b/core/api/src/main/java/org/trellisldp/api/NoopMementoService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/NoopNamespaceService.java b/core/api/src/main/java/org/trellisldp/api/NoopNamespaceService.java index c4975442..94d7d7e3 100644 --- a/core/api/src/main/java/org/trellisldp/api/NoopNamespaceService.java +++ b/core/api/src/main/java/org/trellisldp/api/NoopNamespaceService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.trellisldp.api; import java.util.Collections; diff --git a/core/api/src/main/java/org/trellisldp/api/NoopResourceService.java b/core/api/src/main/java/org/trellisldp/api/NoopResourceService.java index 549c40a3..a541787c 100644 --- a/core/api/src/main/java/org/trellisldp/api/NoopResourceService.java +++ b/core/api/src/main/java/org/trellisldp/api/NoopResourceService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/RDFFactory.java b/core/api/src/main/java/org/trellisldp/api/RDFFactory.java index 697d8536..3e94cdac 100644 --- a/core/api/src/main/java/org/trellisldp/api/RDFFactory.java +++ b/core/api/src/main/java/org/trellisldp/api/RDFFactory.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/RDFaWriterService.java b/core/api/src/main/java/org/trellisldp/api/RDFaWriterService.java index 36b18769..38ef71f0 100644 --- a/core/api/src/main/java/org/trellisldp/api/RDFaWriterService.java +++ b/core/api/src/main/java/org/trellisldp/api/RDFaWriterService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/Resource.java b/core/api/src/main/java/org/trellisldp/api/Resource.java index 4e3bde73..b03e97ea 100644 --- a/core/api/src/main/java/org/trellisldp/api/Resource.java +++ b/core/api/src/main/java/org/trellisldp/api/Resource.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/ResourceService.java b/core/api/src/main/java/org/trellisldp/api/ResourceService.java index d801b407..c406edba 100644 --- a/core/api/src/main/java/org/trellisldp/api/ResourceService.java +++ b/core/api/src/main/java/org/trellisldp/api/ResourceService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/RetrievalService.java b/core/api/src/main/java/org/trellisldp/api/RetrievalService.java index d007f18c..89ee20e2 100644 --- a/core/api/src/main/java/org/trellisldp/api/RetrievalService.java +++ b/core/api/src/main/java/org/trellisldp/api/RetrievalService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.trellisldp.api; import java.util.concurrent.CompletionStage; diff --git a/core/api/src/main/java/org/trellisldp/api/RuntimeTrellisException.java b/core/api/src/main/java/org/trellisldp/api/RuntimeTrellisException.java index c38c48ac..2c0cfe91 100644 --- a/core/api/src/main/java/org/trellisldp/api/RuntimeTrellisException.java +++ b/core/api/src/main/java/org/trellisldp/api/RuntimeTrellisException.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/Session.java b/core/api/src/main/java/org/trellisldp/api/Session.java index 9858ccda..995fbd97 100644 --- a/core/api/src/main/java/org/trellisldp/api/Session.java +++ b/core/api/src/main/java/org/trellisldp/api/Session.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/Syntax.java b/core/api/src/main/java/org/trellisldp/api/Syntax.java index 0f561ea8..5302bba7 100644 --- a/core/api/src/main/java/org/trellisldp/api/Syntax.java +++ b/core/api/src/main/java/org/trellisldp/api/Syntax.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/TrellisUtils.java b/core/api/src/main/java/org/trellisldp/api/TrellisUtils.java index 8b4ec04f..3fe1b4d0 100644 --- a/core/api/src/main/java/org/trellisldp/api/TrellisUtils.java +++ b/core/api/src/main/java/org/trellisldp/api/TrellisUtils.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/main/java/org/trellisldp/api/package-info.java b/core/api/src/main/java/org/trellisldp/api/package-info.java index c1ddac55..7e906fd1 100644 --- a/core/api/src/main/java/org/trellisldp/api/package-info.java +++ b/core/api/src/main/java/org/trellisldp/api/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/test/java/org/trellisldp/api/AuditServiceTest.java b/core/api/src/test/java/org/trellisldp/api/AuditServiceTest.java index 2266d1e5..e1ac87a7 100644 --- a/core/api/src/test/java/org/trellisldp/api/AuditServiceTest.java +++ b/core/api/src/test/java/org/trellisldp/api/AuditServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/test/java/org/trellisldp/api/BinaryMetadataTest.java b/core/api/src/test/java/org/trellisldp/api/BinaryMetadataTest.java index 491dcd74..349e5127 100644 --- a/core/api/src/test/java/org/trellisldp/api/BinaryMetadataTest.java +++ b/core/api/src/test/java/org/trellisldp/api/BinaryMetadataTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/test/java/org/trellisldp/api/BinaryServiceTest.java b/core/api/src/test/java/org/trellisldp/api/BinaryServiceTest.java index 4b90e52f..4ea1b0a6 100644 --- a/core/api/src/test/java/org/trellisldp/api/BinaryServiceTest.java +++ b/core/api/src/test/java/org/trellisldp/api/BinaryServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/test/java/org/trellisldp/api/ConstraintServiceTest.java b/core/api/src/test/java/org/trellisldp/api/ConstraintServiceTest.java index d0d231a8..4ecc92ce 100644 --- a/core/api/src/test/java/org/trellisldp/api/ConstraintServiceTest.java +++ b/core/api/src/test/java/org/trellisldp/api/ConstraintServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/test/java/org/trellisldp/api/ConstraintViolationTest.java b/core/api/src/test/java/org/trellisldp/api/ConstraintViolationTest.java index c3f21fae..e96d9f99 100644 --- a/core/api/src/test/java/org/trellisldp/api/ConstraintViolationTest.java +++ b/core/api/src/test/java/org/trellisldp/api/ConstraintViolationTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/test/java/org/trellisldp/api/DefaultIdentifierServiceTest.java b/core/api/src/test/java/org/trellisldp/api/DefaultIdentifierServiceTest.java index 140c409d..3fcf8349 100644 --- a/core/api/src/test/java/org/trellisldp/api/DefaultIdentifierServiceTest.java +++ b/core/api/src/test/java/org/trellisldp/api/DefaultIdentifierServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/test/java/org/trellisldp/api/MetadataTest.java b/core/api/src/test/java/org/trellisldp/api/MetadataTest.java index 5698a1d9..2381e63c 100644 --- a/core/api/src/test/java/org/trellisldp/api/MetadataTest.java +++ b/core/api/src/test/java/org/trellisldp/api/MetadataTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/test/java/org/trellisldp/api/NoopCacheServiceTest.java b/core/api/src/test/java/org/trellisldp/api/NoopCacheServiceTest.java index 6724911a..b1994f3f 100644 --- a/core/api/src/test/java/org/trellisldp/api/NoopCacheServiceTest.java +++ b/core/api/src/test/java/org/trellisldp/api/NoopCacheServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.trellisldp.api; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/core/api/src/test/java/org/trellisldp/api/NoopEventSerializationServiceTest.java b/core/api/src/test/java/org/trellisldp/api/NoopEventSerializationServiceTest.java index e07522b6..01aff5c0 100644 --- a/core/api/src/test/java/org/trellisldp/api/NoopEventSerializationServiceTest.java +++ b/core/api/src/test/java/org/trellisldp/api/NoopEventSerializationServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/test/java/org/trellisldp/api/NoopEventServiceTest.java b/core/api/src/test/java/org/trellisldp/api/NoopEventServiceTest.java index 9604cb22..08f86662 100644 --- a/core/api/src/test/java/org/trellisldp/api/NoopEventServiceTest.java +++ b/core/api/src/test/java/org/trellisldp/api/NoopEventServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/test/java/org/trellisldp/api/NoopMementoServiceTest.java b/core/api/src/test/java/org/trellisldp/api/NoopMementoServiceTest.java index b5c90539..b32f46c2 100644 --- a/core/api/src/test/java/org/trellisldp/api/NoopMementoServiceTest.java +++ b/core/api/src/test/java/org/trellisldp/api/NoopMementoServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.trellisldp.api; import static java.time.Instant.now; diff --git a/core/api/src/test/java/org/trellisldp/api/NoopNamespaceServiceTest.java b/core/api/src/test/java/org/trellisldp/api/NoopNamespaceServiceTest.java index 8dc3574d..8e757819 100644 --- a/core/api/src/test/java/org/trellisldp/api/NoopNamespaceServiceTest.java +++ b/core/api/src/test/java/org/trellisldp/api/NoopNamespaceServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.trellisldp.api; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/core/api/src/test/java/org/trellisldp/api/NoopResourceServiceTest.java b/core/api/src/test/java/org/trellisldp/api/NoopResourceServiceTest.java index 7a31c04b..4d2b6c8f 100644 --- a/core/api/src/test/java/org/trellisldp/api/NoopResourceServiceTest.java +++ b/core/api/src/test/java/org/trellisldp/api/NoopResourceServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.trellisldp.api; import static org.junit.jupiter.api.Assertions.*; diff --git a/core/api/src/test/java/org/trellisldp/api/RDFFactoryTest.java b/core/api/src/test/java/org/trellisldp/api/RDFFactoryTest.java index 6c9bfec1..2f95aef5 100644 --- a/core/api/src/test/java/org/trellisldp/api/RDFFactoryTest.java +++ b/core/api/src/test/java/org/trellisldp/api/RDFFactoryTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/test/java/org/trellisldp/api/ResourceServiceTest.java b/core/api/src/test/java/org/trellisldp/api/ResourceServiceTest.java index c05e1b07..29129dc2 100644 --- a/core/api/src/test/java/org/trellisldp/api/ResourceServiceTest.java +++ b/core/api/src/test/java/org/trellisldp/api/ResourceServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/test/java/org/trellisldp/api/ResourceTest.java b/core/api/src/test/java/org/trellisldp/api/ResourceTest.java index d8c96019..6ca306a4 100644 --- a/core/api/src/test/java/org/trellisldp/api/ResourceTest.java +++ b/core/api/src/test/java/org/trellisldp/api/ResourceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/test/java/org/trellisldp/api/RuntimeTrellisExceptionTest.java b/core/api/src/test/java/org/trellisldp/api/RuntimeTrellisExceptionTest.java index d982a15f..9de57a8b 100644 --- a/core/api/src/test/java/org/trellisldp/api/RuntimeTrellisExceptionTest.java +++ b/core/api/src/test/java/org/trellisldp/api/RuntimeTrellisExceptionTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/test/java/org/trellisldp/api/SyntaxTest.java b/core/api/src/test/java/org/trellisldp/api/SyntaxTest.java index 76fff166..f869f65b 100644 --- a/core/api/src/test/java/org/trellisldp/api/SyntaxTest.java +++ b/core/api/src/test/java/org/trellisldp/api/SyntaxTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/api/src/test/java/org/trellisldp/api/TrellisUtilsTest.java b/core/api/src/test/java/org/trellisldp/api/TrellisUtilsTest.java index c30b0a7b..fe2fe7c4 100644 --- a/core/api/src/test/java/org/trellisldp/api/TrellisUtilsTest.java +++ b/core/api/src/test/java/org/trellisldp/api/TrellisUtilsTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/build.gradle b/core/http/build.gradle index 10bc44b5..ba83245b 100644 --- a/core/http/build.gradle +++ b/core/http/build.gradle @@ -32,7 +32,7 @@ dependencies { testImplementation "com.fasterxml.jackson.core:jackson-core:$jacksonVersion" testImplementation "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion" testImplementation "org.apache.commons:commons-rdf-simple:$commonsRdfVersion" - testImplementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" testImplementation "org.glassfish.jersey.core:jersey-server:$jerseyVersion" testImplementation "org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:$jerseyVersion" testImplementation "org.glassfish.jersey.inject:jersey-hk2:$jerseyVersion" diff --git a/core/http/src/main/java/module-info.java b/core/http/src/main/java/module-info.java index 1d23fdc1..539ca4c7 100644 --- a/core/http/src/main/java/module-info.java +++ b/core/http/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -25,7 +27,7 @@ requires microprofile.config.api; requires jakarta.enterprise.cdi.api; - requires jakarta.inject.api; + requires jakarta.inject; requires java.annotation; requires java.ws.rs; requires java.xml.bind; diff --git a/core/http/src/main/java/org/trellisldp/http/CacheControlFilter.java b/core/http/src/main/java/org/trellisldp/http/CacheControlFilter.java index f9c6cd48..a2f46905 100644 --- a/core/http/src/main/java/org/trellisldp/http/CacheControlFilter.java +++ b/core/http/src/main/java/org/trellisldp/http/CacheControlFilter.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/TrellisHttpFilter.java b/core/http/src/main/java/org/trellisldp/http/TrellisHttpFilter.java index 0b61cf26..87deb7a6 100644 --- a/core/http/src/main/java/org/trellisldp/http/TrellisHttpFilter.java +++ b/core/http/src/main/java/org/trellisldp/http/TrellisHttpFilter.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/TrellisHttpResource.java b/core/http/src/main/java/org/trellisldp/http/TrellisHttpResource.java index bdf8249c..93896b98 100644 --- a/core/http/src/main/java/org/trellisldp/http/TrellisHttpResource.java +++ b/core/http/src/main/java/org/trellisldp/http/TrellisHttpResource.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/WebSubHeaderFilter.java b/core/http/src/main/java/org/trellisldp/http/WebSubHeaderFilter.java index 9c98b5c6..223c3784 100644 --- a/core/http/src/main/java/org/trellisldp/http/WebSubHeaderFilter.java +++ b/core/http/src/main/java/org/trellisldp/http/WebSubHeaderFilter.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/core/AcceptDatetime.java b/core/http/src/main/java/org/trellisldp/http/core/AcceptDatetime.java index 92d5fe9e..94d55eef 100644 --- a/core/http/src/main/java/org/trellisldp/http/core/AcceptDatetime.java +++ b/core/http/src/main/java/org/trellisldp/http/core/AcceptDatetime.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/core/DefaultTimemapGenerator.java b/core/http/src/main/java/org/trellisldp/http/core/DefaultTimemapGenerator.java index e4831d5d..b6e261b2 100644 --- a/core/http/src/main/java/org/trellisldp/http/core/DefaultTimemapGenerator.java +++ b/core/http/src/main/java/org/trellisldp/http/core/DefaultTimemapGenerator.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/core/Forwarded.java b/core/http/src/main/java/org/trellisldp/http/core/Forwarded.java index c6f0fa16..f2a9fda0 100644 --- a/core/http/src/main/java/org/trellisldp/http/core/Forwarded.java +++ b/core/http/src/main/java/org/trellisldp/http/core/Forwarded.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/core/HttpConstants.java b/core/http/src/main/java/org/trellisldp/http/core/HttpConstants.java index 9e9f609f..039af8fa 100644 --- a/core/http/src/main/java/org/trellisldp/http/core/HttpConstants.java +++ b/core/http/src/main/java/org/trellisldp/http/core/HttpConstants.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -53,6 +55,9 @@ public final class HttpConstants { /** The default Memento TimeMap output format. */ public static final String APPLICATION_LINK_FORMAT = "application/link-format"; + /** Configuration key defining whether LDP interaction model modifications are supported. */ + public static final String CONFIG_HTTP_LDP_MODEL_MODIFICATIONS = "trellis.http.ldp-model-modifications"; + /** Configuration key defining the server's base URL. */ public static final String CONFIG_HTTP_BASE_URL = "trellis.http.base-url"; diff --git a/core/http/src/main/java/org/trellisldp/http/core/HttpSession.java b/core/http/src/main/java/org/trellisldp/http/core/HttpSession.java index bd42989a..d1946141 100644 --- a/core/http/src/main/java/org/trellisldp/http/core/HttpSession.java +++ b/core/http/src/main/java/org/trellisldp/http/core/HttpSession.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/core/PATCH.java b/core/http/src/main/java/org/trellisldp/http/core/PATCH.java index 5337c655..25d589b0 100644 --- a/core/http/src/main/java/org/trellisldp/http/core/PATCH.java +++ b/core/http/src/main/java/org/trellisldp/http/core/PATCH.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/core/Prefer.java b/core/http/src/main/java/org/trellisldp/http/core/Prefer.java index 621b9008..63293af1 100644 --- a/core/http/src/main/java/org/trellisldp/http/core/Prefer.java +++ b/core/http/src/main/java/org/trellisldp/http/core/Prefer.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/core/Range.java b/core/http/src/main/java/org/trellisldp/http/core/Range.java index f2e0abc4..48ed4c7c 100644 --- a/core/http/src/main/java/org/trellisldp/http/core/Range.java +++ b/core/http/src/main/java/org/trellisldp/http/core/Range.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/core/RdfMediaType.java b/core/http/src/main/java/org/trellisldp/http/core/RdfMediaType.java index 02efec84..4e1f5443 100644 --- a/core/http/src/main/java/org/trellisldp/http/core/RdfMediaType.java +++ b/core/http/src/main/java/org/trellisldp/http/core/RdfMediaType.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/core/ServiceBundler.java b/core/http/src/main/java/org/trellisldp/http/core/ServiceBundler.java index a3683a78..f29b4018 100644 --- a/core/http/src/main/java/org/trellisldp/http/core/ServiceBundler.java +++ b/core/http/src/main/java/org/trellisldp/http/core/ServiceBundler.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/core/SimpleEvent.java b/core/http/src/main/java/org/trellisldp/http/core/SimpleEvent.java index 2a95adc5..1fcf2e7d 100644 --- a/core/http/src/main/java/org/trellisldp/http/core/SimpleEvent.java +++ b/core/http/src/main/java/org/trellisldp/http/core/SimpleEvent.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/core/Slug.java b/core/http/src/main/java/org/trellisldp/http/core/Slug.java index cf2c6532..d5c92a9f 100644 --- a/core/http/src/main/java/org/trellisldp/http/core/Slug.java +++ b/core/http/src/main/java/org/trellisldp/http/core/Slug.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/core/TimemapGenerator.java b/core/http/src/main/java/org/trellisldp/http/core/TimemapGenerator.java index 4fbe45f6..c9b53041 100644 --- a/core/http/src/main/java/org/trellisldp/http/core/TimemapGenerator.java +++ b/core/http/src/main/java/org/trellisldp/http/core/TimemapGenerator.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/core/TrellisExtensions.java b/core/http/src/main/java/org/trellisldp/http/core/TrellisExtensions.java index 48834c7c..7996af46 100644 --- a/core/http/src/main/java/org/trellisldp/http/core/TrellisExtensions.java +++ b/core/http/src/main/java/org/trellisldp/http/core/TrellisExtensions.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/core/TrellisRequest.java b/core/http/src/main/java/org/trellisldp/http/core/TrellisRequest.java index 7e447423..9d9c0b2b 100644 --- a/core/http/src/main/java/org/trellisldp/http/core/TrellisRequest.java +++ b/core/http/src/main/java/org/trellisldp/http/core/TrellisRequest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/core/Version.java b/core/http/src/main/java/org/trellisldp/http/core/Version.java index 4ab11194..77656a6e 100644 --- a/core/http/src/main/java/org/trellisldp/http/core/Version.java +++ b/core/http/src/main/java/org/trellisldp/http/core/Version.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/core/package-info.java b/core/http/src/main/java/org/trellisldp/http/core/package-info.java index 1d302833..4d338508 100644 --- a/core/http/src/main/java/org/trellisldp/http/core/package-info.java +++ b/core/http/src/main/java/org/trellisldp/http/core/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/impl/BaseLdpHandler.java b/core/http/src/main/java/org/trellisldp/http/impl/BaseLdpHandler.java index 65ceb916..c39731a6 100644 --- a/core/http/src/main/java/org/trellisldp/http/impl/BaseLdpHandler.java +++ b/core/http/src/main/java/org/trellisldp/http/impl/BaseLdpHandler.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/impl/DeleteHandler.java b/core/http/src/main/java/org/trellisldp/http/impl/DeleteHandler.java index 571b03d9..ab2708a0 100644 --- a/core/http/src/main/java/org/trellisldp/http/impl/DeleteHandler.java +++ b/core/http/src/main/java/org/trellisldp/http/impl/DeleteHandler.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/impl/GetConfiguration.java b/core/http/src/main/java/org/trellisldp/http/impl/GetConfiguration.java index 7c47863e..07d46922 100644 --- a/core/http/src/main/java/org/trellisldp/http/impl/GetConfiguration.java +++ b/core/http/src/main/java/org/trellisldp/http/impl/GetConfiguration.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/impl/GetHandler.java b/core/http/src/main/java/org/trellisldp/http/impl/GetHandler.java index e36c0815..b2e39443 100644 --- a/core/http/src/main/java/org/trellisldp/http/impl/GetHandler.java +++ b/core/http/src/main/java/org/trellisldp/http/impl/GetHandler.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/impl/HttpUtils.java b/core/http/src/main/java/org/trellisldp/http/impl/HttpUtils.java index bce91a6b..b708fc2a 100644 --- a/core/http/src/main/java/org/trellisldp/http/impl/HttpUtils.java +++ b/core/http/src/main/java/org/trellisldp/http/impl/HttpUtils.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/impl/MementoResource.java b/core/http/src/main/java/org/trellisldp/http/impl/MementoResource.java index a4af64a2..9fcc80c9 100644 --- a/core/http/src/main/java/org/trellisldp/http/impl/MementoResource.java +++ b/core/http/src/main/java/org/trellisldp/http/impl/MementoResource.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/impl/MutatingLdpHandler.java b/core/http/src/main/java/org/trellisldp/http/impl/MutatingLdpHandler.java index 2d351e7c..b24d99a9 100644 --- a/core/http/src/main/java/org/trellisldp/http/impl/MutatingLdpHandler.java +++ b/core/http/src/main/java/org/trellisldp/http/impl/MutatingLdpHandler.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -243,7 +245,7 @@ protected void checkConstraint(final Graph graph, final IRI type, final RDFSynta violations.forEach(v -> err.link(v.getConstraint().getIRIString(), LDP.constrainedBy.getIRIString())); throw new ClientErrorException(err.entity((StreamingOutput) out -> getServices().getIOService().write(violations.stream().flatMap(v2 -> v2.getTriples().stream()), - out, syntax, getIdentifier())).build()); + out, syntax, getIdentifier())).type(syntax.mediaType()).build()); } } diff --git a/core/http/src/main/java/org/trellisldp/http/impl/OptionsHandler.java b/core/http/src/main/java/org/trellisldp/http/impl/OptionsHandler.java index bfcc0c76..124d12e2 100644 --- a/core/http/src/main/java/org/trellisldp/http/impl/OptionsHandler.java +++ b/core/http/src/main/java/org/trellisldp/http/impl/OptionsHandler.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/impl/PatchHandler.java b/core/http/src/main/java/org/trellisldp/http/impl/PatchHandler.java index b24afc6f..58df6732 100644 --- a/core/http/src/main/java/org/trellisldp/http/impl/PatchHandler.java +++ b/core/http/src/main/java/org/trellisldp/http/impl/PatchHandler.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -243,7 +245,9 @@ private CompletionStage assembleResponse(final Dataset mutable, if (!violations.isEmpty()) { final ResponseBuilder err = status(CONFLICT); violations.forEach(v -> err.link(v.getConstraint().getIRIString(), LDP.constrainedBy.getIRIString())); - throw new ClientErrorException(err.build()); + throw new ClientErrorException(err.entity((StreamingOutput) out -> + getServices().getIOService().write(violations.stream().flatMap(v2 -> v2.getTriples().stream()), + out, RDFSyntax.TURTLE, getIdentifier())).type(RDFSyntax.TURTLE.mediaType()).build()); } // When updating one particular graph, be sure to add the other category to the dataset diff --git a/core/http/src/main/java/org/trellisldp/http/impl/PostHandler.java b/core/http/src/main/java/org/trellisldp/http/impl/PostHandler.java index d29f84f4..4025ddfd 100644 --- a/core/http/src/main/java/org/trellisldp/http/impl/PostHandler.java +++ b/core/http/src/main/java/org/trellisldp/http/impl/PostHandler.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/impl/PutHandler.java b/core/http/src/main/java/org/trellisldp/http/impl/PutHandler.java index d10b5a3b..437e9aa5 100644 --- a/core/http/src/main/java/org/trellisldp/http/impl/PutHandler.java +++ b/core/http/src/main/java/org/trellisldp/http/impl/PutHandler.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -24,9 +26,11 @@ import static javax.ws.rs.core.Response.Status.NO_CONTENT; import static javax.ws.rs.core.Response.status; import static org.apache.commons.rdf.api.RDFSyntax.TURTLE; +import static org.eclipse.microprofile.config.ConfigProvider.getConfig; import static org.slf4j.LoggerFactory.getLogger; import static org.trellisldp.api.TrellisUtils.TRELLIS_DATA_PREFIX; import static org.trellisldp.api.TrellisUtils.getContainer; +import static org.trellisldp.http.core.HttpConstants.CONFIG_HTTP_LDP_MODEL_MODIFICATIONS; import static org.trellisldp.http.impl.HttpUtils.checkRequiredPreconditions; import static org.trellisldp.http.impl.HttpUtils.closeDataset; import static org.trellisldp.http.impl.HttpUtils.exists; @@ -75,6 +79,7 @@ public class PutHandler extends MutatingLdpHandler { private final IRI heuristicType; private final boolean preconditionRequired; private final boolean createUncontained; + private final boolean supportsLdpTypeModifications; /** * Create a builder for an LDP PUT response. @@ -96,6 +101,8 @@ public PutHandler(final TrellisRequest req, final InputStream entity, final Serv this.heuristicType = req.getContentType() != null && rdfSyntax == null ? LDP.NonRDFSource : LDP.RDFSource; this.preconditionRequired = preconditionRequired; this.createUncontained = createUncontained; + this.supportsLdpTypeModifications = getConfig() + .getOptionalValue(CONFIG_HTTP_LDP_MODEL_MODIFICATIONS, Boolean.class).orElse(Boolean.TRUE); } /** @@ -153,8 +160,7 @@ public CompletionStage setResource(final ResponseBuilder builde } // It is not possible to change the LDP type to a type that is not a subclass - if (getResource() != null && !isBinaryDescription() - && ldpResourceTypes(ldpType).noneMatch(getResource().getInteractionModel()::equals)) { + if (hasInteractionModelChangeRestriction(ldpType)) { LOGGER.error("Cannot change the LDP type to {} for {}", ldpType, getIdentifier()); throw new ClientErrorException("Cannot change the LDP type to " + ldpType, status(CONFLICT).build()); } @@ -182,6 +188,11 @@ protected String getIdentifier() { + (getExtensionGraphName() != null ? "?ext=" + getRequest().getExt() : ""); } + private boolean hasInteractionModelChangeRestriction(final IRI ldpType) { + return getResource() != null && !isBinaryDescription() + && ldpResourceTypes(ldpType).noneMatch(getResource().getInteractionModel()::equals); + } + private static RDFSyntax getRdfSyntax(final String contentType, final List syntaxes) { if (contentType != null) { final MediaType mediaType = MediaType.valueOf(contentType); @@ -198,6 +209,9 @@ private IRI getLdpType() { if (isBinaryDescription()) { return LDP.NonRDFSource; } + if (!supportsLdpTypeModifications && getResource() != null) { + return getResource().getInteractionModel(); + } final Link link = getRequest().getLink(); if (link != null && Link.TYPE.equals(link.getRel())) { final String uri = link.getUri().toString(); diff --git a/core/http/src/main/java/org/trellisldp/http/impl/package-info.java b/core/http/src/main/java/org/trellisldp/http/impl/package-info.java index 71ab8d9c..e7e29319 100644 --- a/core/http/src/main/java/org/trellisldp/http/impl/package-info.java +++ b/core/http/src/main/java/org/trellisldp/http/impl/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/main/java/org/trellisldp/http/package-info.java b/core/http/src/main/java/org/trellisldp/http/package-info.java index 8c5e68e9..eb26bde6 100644 --- a/core/http/src/main/java/org/trellisldp/http/package-info.java +++ b/core/http/src/main/java/org/trellisldp/http/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/AbstractTrellisHttpResourceTest.java b/core/http/src/test/java/org/trellisldp/http/AbstractTrellisHttpResourceTest.java index 9a8bec84..a991da7b 100644 --- a/core/http/src/test/java/org/trellisldp/http/AbstractTrellisHttpResourceTest.java +++ b/core/http/src/test/java/org/trellisldp/http/AbstractTrellisHttpResourceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/BaseTrellisHttpResourceTest.java b/core/http/src/test/java/org/trellisldp/http/BaseTrellisHttpResourceTest.java index 3ebedc9b..d00da0a3 100644 --- a/core/http/src/test/java/org/trellisldp/http/BaseTrellisHttpResourceTest.java +++ b/core/http/src/test/java/org/trellisldp/http/BaseTrellisHttpResourceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/CacheControlFilterTest.java b/core/http/src/test/java/org/trellisldp/http/CacheControlFilterTest.java index acacfbf8..5fd37b1b 100644 --- a/core/http/src/test/java/org/trellisldp/http/CacheControlFilterTest.java +++ b/core/http/src/test/java/org/trellisldp/http/CacheControlFilterTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/TestAuthenticationFilter.java b/core/http/src/test/java/org/trellisldp/http/TestAuthenticationFilter.java index 25e74736..76c4ff1d 100644 --- a/core/http/src/test/java/org/trellisldp/http/TestAuthenticationFilter.java +++ b/core/http/src/test/java/org/trellisldp/http/TestAuthenticationFilter.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/TrellisHttpFilterTest.java b/core/http/src/test/java/org/trellisldp/http/TrellisHttpFilterTest.java index ce5fabc2..98d36711 100644 --- a/core/http/src/test/java/org/trellisldp/http/TrellisHttpFilterTest.java +++ b/core/http/src/test/java/org/trellisldp/http/TrellisHttpFilterTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceAdminTest.java b/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceAdminTest.java index 9b77aa64..c4fa7df3 100644 --- a/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceAdminTest.java +++ b/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceAdminTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceBaseUrlTest.java b/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceBaseUrlTest.java index 981bd463..7113ca93 100644 --- a/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceBaseUrlTest.java +++ b/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceBaseUrlTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceNoAgentTest.java b/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceNoAgentTest.java index 4f50eedf..b0c12897 100644 --- a/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceNoAgentTest.java +++ b/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceNoAgentTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceTest.java b/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceTest.java index 4ea15ca3..26c6ac5b 100644 --- a/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceTest.java +++ b/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceUserTest.java b/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceUserTest.java index 6bd07630..848c8319 100644 --- a/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceUserTest.java +++ b/core/http/src/test/java/org/trellisldp/http/TrellisHttpResourceUserTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/WebSubHeaderFilterTest.java b/core/http/src/test/java/org/trellisldp/http/WebSubHeaderFilterTest.java index f4172b68..d87fcdcc 100644 --- a/core/http/src/test/java/org/trellisldp/http/WebSubHeaderFilterTest.java +++ b/core/http/src/test/java/org/trellisldp/http/WebSubHeaderFilterTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/core/AcceptDatetimeTest.java b/core/http/src/test/java/org/trellisldp/http/core/AcceptDatetimeTest.java index ce48453f..a5a0222e 100644 --- a/core/http/src/test/java/org/trellisldp/http/core/AcceptDatetimeTest.java +++ b/core/http/src/test/java/org/trellisldp/http/core/AcceptDatetimeTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/core/DefaultTimemapGeneratorTest.java b/core/http/src/test/java/org/trellisldp/http/core/DefaultTimemapGeneratorTest.java index f299e981..cce9110b 100644 --- a/core/http/src/test/java/org/trellisldp/http/core/DefaultTimemapGeneratorTest.java +++ b/core/http/src/test/java/org/trellisldp/http/core/DefaultTimemapGeneratorTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/core/ForwardedTest.java b/core/http/src/test/java/org/trellisldp/http/core/ForwardedTest.java index 9b07d433..bf258919 100644 --- a/core/http/src/test/java/org/trellisldp/http/core/ForwardedTest.java +++ b/core/http/src/test/java/org/trellisldp/http/core/ForwardedTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/core/HttpSessionTest.java b/core/http/src/test/java/org/trellisldp/http/core/HttpSessionTest.java index 1cff98c0..3f42b6b1 100644 --- a/core/http/src/test/java/org/trellisldp/http/core/HttpSessionTest.java +++ b/core/http/src/test/java/org/trellisldp/http/core/HttpSessionTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/core/PreferTest.java b/core/http/src/test/java/org/trellisldp/http/core/PreferTest.java index 3933778a..ca3f140b 100644 --- a/core/http/src/test/java/org/trellisldp/http/core/PreferTest.java +++ b/core/http/src/test/java/org/trellisldp/http/core/PreferTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/core/RangeTest.java b/core/http/src/test/java/org/trellisldp/http/core/RangeTest.java index 145657b1..bed78a73 100644 --- a/core/http/src/test/java/org/trellisldp/http/core/RangeTest.java +++ b/core/http/src/test/java/org/trellisldp/http/core/RangeTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/core/SimpleEventTest.java b/core/http/src/test/java/org/trellisldp/http/core/SimpleEventTest.java index a682a15b..b5338ecf 100644 --- a/core/http/src/test/java/org/trellisldp/http/core/SimpleEventTest.java +++ b/core/http/src/test/java/org/trellisldp/http/core/SimpleEventTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/core/SlugTest.java b/core/http/src/test/java/org/trellisldp/http/core/SlugTest.java index be907a04..8810ee71 100644 --- a/core/http/src/test/java/org/trellisldp/http/core/SlugTest.java +++ b/core/http/src/test/java/org/trellisldp/http/core/SlugTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/core/TrellisExtensionsTest.java b/core/http/src/test/java/org/trellisldp/http/core/TrellisExtensionsTest.java index 10a84301..81909c8a 100644 --- a/core/http/src/test/java/org/trellisldp/http/core/TrellisExtensionsTest.java +++ b/core/http/src/test/java/org/trellisldp/http/core/TrellisExtensionsTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/core/TrellisRequestTest.java b/core/http/src/test/java/org/trellisldp/http/core/TrellisRequestTest.java index 53e51439..07384710 100644 --- a/core/http/src/test/java/org/trellisldp/http/core/TrellisRequestTest.java +++ b/core/http/src/test/java/org/trellisldp/http/core/TrellisRequestTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/core/VersionTest.java b/core/http/src/test/java/org/trellisldp/http/core/VersionTest.java index 07d1d1dd..5971b226 100644 --- a/core/http/src/test/java/org/trellisldp/http/core/VersionTest.java +++ b/core/http/src/test/java/org/trellisldp/http/core/VersionTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/impl/BaseTestHandler.java b/core/http/src/test/java/org/trellisldp/http/impl/BaseTestHandler.java index ddcaae61..52965039 100644 --- a/core/http/src/test/java/org/trellisldp/http/impl/BaseTestHandler.java +++ b/core/http/src/test/java/org/trellisldp/http/impl/BaseTestHandler.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/impl/DeleteHandlerTest.java b/core/http/src/test/java/org/trellisldp/http/impl/DeleteHandlerTest.java index 090c7024..e5d73fa6 100644 --- a/core/http/src/test/java/org/trellisldp/http/impl/DeleteHandlerTest.java +++ b/core/http/src/test/java/org/trellisldp/http/impl/DeleteHandlerTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/impl/GetHandlerTest.java b/core/http/src/test/java/org/trellisldp/http/impl/GetHandlerTest.java index b81d8bc6..ad9209c5 100644 --- a/core/http/src/test/java/org/trellisldp/http/impl/GetHandlerTest.java +++ b/core/http/src/test/java/org/trellisldp/http/impl/GetHandlerTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/impl/HttpUtilsTest.java b/core/http/src/test/java/org/trellisldp/http/impl/HttpUtilsTest.java index 462018e1..6674b092 100644 --- a/core/http/src/test/java/org/trellisldp/http/impl/HttpUtilsTest.java +++ b/core/http/src/test/java/org/trellisldp/http/impl/HttpUtilsTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/impl/MementoResourceTest.java b/core/http/src/test/java/org/trellisldp/http/impl/MementoResourceTest.java index b47fc6ec..78757cb5 100644 --- a/core/http/src/test/java/org/trellisldp/http/impl/MementoResourceTest.java +++ b/core/http/src/test/java/org/trellisldp/http/impl/MementoResourceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/impl/OptionsHandlerTest.java b/core/http/src/test/java/org/trellisldp/http/impl/OptionsHandlerTest.java index 37b4aacf..2733f1c4 100644 --- a/core/http/src/test/java/org/trellisldp/http/impl/OptionsHandlerTest.java +++ b/core/http/src/test/java/org/trellisldp/http/impl/OptionsHandlerTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/impl/PatchHandlerTest.java b/core/http/src/test/java/org/trellisldp/http/impl/PatchHandlerTest.java index 813bbbbe..7ff95f65 100644 --- a/core/http/src/test/java/org/trellisldp/http/impl/PatchHandlerTest.java +++ b/core/http/src/test/java/org/trellisldp/http/impl/PatchHandlerTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/impl/PostHandlerTest.java b/core/http/src/test/java/org/trellisldp/http/impl/PostHandlerTest.java index bf292830..92df6e2e 100644 --- a/core/http/src/test/java/org/trellisldp/http/impl/PostHandlerTest.java +++ b/core/http/src/test/java/org/trellisldp/http/impl/PostHandlerTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/http/src/test/java/org/trellisldp/http/impl/PutHandlerTest.java b/core/http/src/test/java/org/trellisldp/http/impl/PutHandlerTest.java index 1b5a6dd2..264237ce 100644 --- a/core/http/src/test/java/org/trellisldp/http/impl/PutHandlerTest.java +++ b/core/http/src/test/java/org/trellisldp/http/impl/PutHandlerTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -81,6 +83,27 @@ void testPutConflict() { } } + @Test + void testPutNoConflict() { + try { + System.setProperty(HttpConstants.CONFIG_HTTP_LDP_MODEL_MODIFICATIONS, "false"); + when(mockResource.getInteractionModel()).thenReturn(LDP.BasicContainer); + when(mockTrellisRequest.getLink()).thenReturn(fromUri(LDP.DirectContainer.getIRIString()).rel(TYPE) + .build()); + when(mockTrellisRequest.getContentType()).thenReturn(TEXT_TURTLE); + + final PutHandler handler = buildPutHandler(RESOURCE_TURTLE, "http://example.com/"); + + // Update an existing resource + try (final Response res = handler.setResource(handler.initialize(mockParent, mockResource)) + .toCompletableFuture().join().build()) { + assertEquals(NO_CONTENT, res.getStatusInfo()); + } + } finally { + System.clearProperty(HttpConstants.CONFIG_HTTP_LDP_MODEL_MODIFICATIONS); + } + } + @Test void testBadAudit() { when(mockBundler.getAuditService()).thenReturn(new DefaultAuditService() {}); @@ -105,6 +128,7 @@ void testNoVersioning() { try { System.setProperty(HttpConstants.CONFIG_HTTP_VERSIONING, "false"); + System.setProperty(HttpConstants.CONFIG_HTTP_LDP_MODEL_MODIFICATIONS, "false"); final PutHandler handler = buildPutHandler(RESOURCE_TURTLE, null, false); try (final Response res = handler.setResource(handler.initialize(mockParent, MISSING_RESOURCE)) .thenCompose(handler::updateMemento).toCompletableFuture().join().build()) { @@ -115,6 +139,7 @@ void testNoVersioning() { } finally { System.clearProperty(HttpConstants.CONFIG_HTTP_VERSIONING); + System.clearProperty(HttpConstants.CONFIG_HTTP_LDP_MODEL_MODIFICATIONS); } } diff --git a/core/vocabulary/src/main/java/module-info.java b/core/vocabulary/src/main/java/module-info.java index 1fe1d8af..9cc6f35a 100644 --- a/core/vocabulary/src/main/java/module-info.java +++ b/core/vocabulary/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/ACL.java b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/ACL.java index 8e1316cc..a859f749 100644 --- a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/ACL.java +++ b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/ACL.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/AS.java b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/AS.java index 9190d534..8f99f207 100644 --- a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/AS.java +++ b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/AS.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/DC.java b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/DC.java index b5c7461c..f32fa9fe 100644 --- a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/DC.java +++ b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/DC.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/FOAF.java b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/FOAF.java index ae1cd6ab..6f5d1f0a 100644 --- a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/FOAF.java +++ b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/FOAF.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/JSONLD.java b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/JSONLD.java index 00c2bd5e..0fbb79ab 100644 --- a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/JSONLD.java +++ b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/JSONLD.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/LDP.java b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/LDP.java index d06e9cdd..7d82630b 100644 --- a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/LDP.java +++ b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/LDP.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/Memento.java b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/Memento.java index f7b39ae0..a338990b 100644 --- a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/Memento.java +++ b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/Memento.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/OA.java b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/OA.java index dfd1a9fa..64a1cbbe 100644 --- a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/OA.java +++ b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/OA.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/PROV.java b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/PROV.java index 975961d5..defc2393 100644 --- a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/PROV.java +++ b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/PROV.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/RDF.java b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/RDF.java index 01d95487..91371ad7 100644 --- a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/RDF.java +++ b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/RDF.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/RDFS.java b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/RDFS.java index ab3982d4..98a6ac7b 100644 --- a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/RDFS.java +++ b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/RDFS.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/SKOS.java b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/SKOS.java index 0facc312..93877e0a 100644 --- a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/SKOS.java +++ b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/SKOS.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/Time.java b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/Time.java index 6437c9eb..27321eba 100644 --- a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/Time.java +++ b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/Time.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/Trellis.java b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/Trellis.java index 07dd1f37..634899fc 100644 --- a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/Trellis.java +++ b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/Trellis.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/VCARD.java b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/VCARD.java index c0ffb6bf..97b2baaa 100644 --- a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/VCARD.java +++ b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/VCARD.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/VocabUtils.java b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/VocabUtils.java index cac92d84..26472cf7 100644 --- a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/VocabUtils.java +++ b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/VocabUtils.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/XSD.java b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/XSD.java index 117e9f81..c2940ae9 100644 --- a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/XSD.java +++ b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/XSD.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/package-info.java b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/package-info.java index c5048822..e749dd06 100644 --- a/core/vocabulary/src/main/java/org/trellisldp/vocabulary/package-info.java +++ b/core/vocabulary/src/main/java/org/trellisldp/vocabulary/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/ACLTest.java b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/ACLTest.java index 20c014a4..16ea98ef 100644 --- a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/ACLTest.java +++ b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/ACLTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/ASTest.java b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/ASTest.java index 6d7041e3..af3bb743 100644 --- a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/ASTest.java +++ b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/ASTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/AbstractVocabularyTest.java b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/AbstractVocabularyTest.java index 0bb65cef..5c872e38 100644 --- a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/AbstractVocabularyTest.java +++ b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/AbstractVocabularyTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/DCTest.java b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/DCTest.java index aa9e75e8..0cf8d461 100644 --- a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/DCTest.java +++ b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/DCTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/FOAFTest.java b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/FOAFTest.java index 1c3652ca..fa81cb7e 100644 --- a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/FOAFTest.java +++ b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/FOAFTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/JSONLDTest.java b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/JSONLDTest.java index b950e8de..48547086 100644 --- a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/JSONLDTest.java +++ b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/JSONLDTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/LDPTest.java b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/LDPTest.java index 81adb67c..cddede63 100644 --- a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/LDPTest.java +++ b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/LDPTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/MementoTest.java b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/MementoTest.java index d77ffef6..f8c1c91c 100644 --- a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/MementoTest.java +++ b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/MementoTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/OATest.java b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/OATest.java index 56f4f84a..3cb1c24e 100644 --- a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/OATest.java +++ b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/OATest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/PROVTest.java b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/PROVTest.java index 67b1c12e..f350f9ef 100644 --- a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/PROVTest.java +++ b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/PROVTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/RDFSTest.java b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/RDFSTest.java index 42b5bede..94cd3c4d 100644 --- a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/RDFSTest.java +++ b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/RDFSTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/RDFTest.java b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/RDFTest.java index 292d1369..1fb0536e 100644 --- a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/RDFTest.java +++ b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/RDFTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/SKOSTest.java b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/SKOSTest.java index 888de3c1..04d14dc0 100644 --- a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/SKOSTest.java +++ b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/SKOSTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/TimeTest.java b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/TimeTest.java index 58caf9b8..60cd091e 100644 --- a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/TimeTest.java +++ b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/TimeTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/TrellisTest.java b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/TrellisTest.java index 81954fa0..45b2dbcf 100644 --- a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/TrellisTest.java +++ b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/TrellisTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/VCARDTest.java b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/VCARDTest.java index 25b11c39..5dda3c1a 100644 --- a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/VCARDTest.java +++ b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/VCARDTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/XSDTest.java b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/XSDTest.java index 7364d944..93103a26 100644 --- a/core/vocabulary/src/test/java/org/trellisldp/vocabulary/XSDTest.java +++ b/core/vocabulary/src/test/java/org/trellisldp/vocabulary/XSDTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/amqp/build.gradle b/notifications/amqp/build.gradle index f66b1889..1f0c1441 100644 --- a/notifications/amqp/build.gradle +++ b/notifications/amqp/build.gradle @@ -25,7 +25,7 @@ dependencies { testImplementation "ch.qos.logback:logback-classic:$logbackVersion" testImplementation "com.sleepycat:je:$sleepycatVersion" - testImplementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" testImplementation "org.apache.commons:commons-rdf-simple:$commonsRdfVersion" testImplementation "org.mockito:mockito-core:$mockitoVersion" testImplementation project(':trellis-event-jackson') diff --git a/notifications/amqp/src/main/java/module-info.java b/notifications/amqp/src/main/java/module-info.java index e8f8ba9e..4a629811 100644 --- a/notifications/amqp/src/main/java/module-info.java +++ b/notifications/amqp/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,7 +17,7 @@ exports org.trellisldp.amqp; requires com.rabbitmq.client; - requires jakarta.inject.api; + requires jakarta.inject; requires microprofile.config.api; requires org.apache.commons.rdf.api; requires org.slf4j; diff --git a/notifications/amqp/src/main/java/org/trellisldp/amqp/AmqpEventService.java b/notifications/amqp/src/main/java/org/trellisldp/amqp/AmqpEventService.java index 00792744..2eb956c7 100644 --- a/notifications/amqp/src/main/java/org/trellisldp/amqp/AmqpEventService.java +++ b/notifications/amqp/src/main/java/org/trellisldp/amqp/AmqpEventService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/amqp/src/main/java/org/trellisldp/amqp/package-info.java b/notifications/amqp/src/main/java/org/trellisldp/amqp/package-info.java index 271c2457..fa334528 100644 --- a/notifications/amqp/src/main/java/org/trellisldp/amqp/package-info.java +++ b/notifications/amqp/src/main/java/org/trellisldp/amqp/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/amqp/src/test/java/org/trellisldp/amqp/AmqpEventServiceTest.java b/notifications/amqp/src/test/java/org/trellisldp/amqp/AmqpEventServiceTest.java index 7fcf09f3..07430d12 100644 --- a/notifications/amqp/src/test/java/org/trellisldp/amqp/AmqpEventServiceTest.java +++ b/notifications/amqp/src/test/java/org/trellisldp/amqp/AmqpEventServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/event-jackson/src/main/java/module-info.java b/notifications/event-jackson/src/main/java/module-info.java index 129846c5..9edd806a 100644 --- a/notifications/event-jackson/src/main/java/module-info.java +++ b/notifications/event-jackson/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/event-jackson/src/main/java/org/trellisldp/event/jackson/ActivityStreamMessage.java b/notifications/event-jackson/src/main/java/org/trellisldp/event/jackson/ActivityStreamMessage.java index 3c5f1dfe..cc8692e7 100644 --- a/notifications/event-jackson/src/main/java/org/trellisldp/event/jackson/ActivityStreamMessage.java +++ b/notifications/event-jackson/src/main/java/org/trellisldp/event/jackson/ActivityStreamMessage.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/event-jackson/src/main/java/org/trellisldp/event/jackson/DefaultEventSerializationService.java b/notifications/event-jackson/src/main/java/org/trellisldp/event/jackson/DefaultEventSerializationService.java index 6150c5e6..e291985b 100644 --- a/notifications/event-jackson/src/main/java/org/trellisldp/event/jackson/DefaultEventSerializationService.java +++ b/notifications/event-jackson/src/main/java/org/trellisldp/event/jackson/DefaultEventSerializationService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/event-jackson/src/main/java/org/trellisldp/event/jackson/package-info.java b/notifications/event-jackson/src/main/java/org/trellisldp/event/jackson/package-info.java index 419e0403..fb3f2f63 100644 --- a/notifications/event-jackson/src/main/java/org/trellisldp/event/jackson/package-info.java +++ b/notifications/event-jackson/src/main/java/org/trellisldp/event/jackson/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/event-jackson/src/test/java/org/trellisldp/event/jackson/DefaultEventSerializationServiceTest.java b/notifications/event-jackson/src/test/java/org/trellisldp/event/jackson/DefaultEventSerializationServiceTest.java index 1bd367db..c723793b 100644 --- a/notifications/event-jackson/src/test/java/org/trellisldp/event/jackson/DefaultEventSerializationServiceTest.java +++ b/notifications/event-jackson/src/test/java/org/trellisldp/event/jackson/DefaultEventSerializationServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/event-jsonb/src/main/java/module-info.java b/notifications/event-jsonb/src/main/java/module-info.java index a4b23c43..22b44007 100644 --- a/notifications/event-jsonb/src/main/java/module-info.java +++ b/notifications/event-jsonb/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/event-jsonb/src/main/java/org/trellisldp/event/jsonb/ActivityStreamMessage.java b/notifications/event-jsonb/src/main/java/org/trellisldp/event/jsonb/ActivityStreamMessage.java index e5ed845c..a4eb1bb8 100644 --- a/notifications/event-jsonb/src/main/java/org/trellisldp/event/jsonb/ActivityStreamMessage.java +++ b/notifications/event-jsonb/src/main/java/org/trellisldp/event/jsonb/ActivityStreamMessage.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/event-jsonb/src/main/java/org/trellisldp/event/jsonb/DefaultEventSerializationService.java b/notifications/event-jsonb/src/main/java/org/trellisldp/event/jsonb/DefaultEventSerializationService.java index b81d92e0..fc1e2b15 100644 --- a/notifications/event-jsonb/src/main/java/org/trellisldp/event/jsonb/DefaultEventSerializationService.java +++ b/notifications/event-jsonb/src/main/java/org/trellisldp/event/jsonb/DefaultEventSerializationService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/event-jsonb/src/main/java/org/trellisldp/event/jsonb/package-info.java b/notifications/event-jsonb/src/main/java/org/trellisldp/event/jsonb/package-info.java index c58852f7..1114745c 100644 --- a/notifications/event-jsonb/src/main/java/org/trellisldp/event/jsonb/package-info.java +++ b/notifications/event-jsonb/src/main/java/org/trellisldp/event/jsonb/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/event-jsonb/src/test/java/org/trellisldp/event/jsonb/DefaultEventSerializationServiceTest.java b/notifications/event-jsonb/src/test/java/org/trellisldp/event/jsonb/DefaultEventSerializationServiceTest.java index 26d176c7..ec5e37f2 100644 --- a/notifications/event-jsonb/src/test/java/org/trellisldp/event/jsonb/DefaultEventSerializationServiceTest.java +++ b/notifications/event-jsonb/src/test/java/org/trellisldp/event/jsonb/DefaultEventSerializationServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/jms/build.gradle b/notifications/jms/build.gradle index ed51e5df..70c63bf0 100644 --- a/notifications/jms/build.gradle +++ b/notifications/jms/build.gradle @@ -25,7 +25,7 @@ dependencies { testImplementation "org.apache.activemq:activemq-client:$activeMqVersion" testImplementation "ch.qos.logback:logback-classic:$logbackVersion" - testImplementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" testImplementation "org.apache.commons:commons-rdf-simple:$commonsRdfVersion" testImplementation "org.mockito:mockito-core:$mockitoVersion" testImplementation project(':trellis-event-jackson') diff --git a/notifications/jms/src/main/java/module-info.java b/notifications/jms/src/main/java/module-info.java index 71375224..1eff385c 100644 --- a/notifications/jms/src/main/java/module-info.java +++ b/notifications/jms/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,7 +20,7 @@ requires org.apache.commons.rdf.api; requires java.naming; requires jakarta.jms.api; - requires jakarta.inject.api; + requires jakarta.inject; requires microprofile.config.api; requires org.slf4j; } diff --git a/notifications/jms/src/main/java/org/trellisldp/jms/JmsEventService.java b/notifications/jms/src/main/java/org/trellisldp/jms/JmsEventService.java index a62120b8..a9cec403 100644 --- a/notifications/jms/src/main/java/org/trellisldp/jms/JmsEventService.java +++ b/notifications/jms/src/main/java/org/trellisldp/jms/JmsEventService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/jms/src/main/java/org/trellisldp/jms/package-info.java b/notifications/jms/src/main/java/org/trellisldp/jms/package-info.java index 6dd083ce..6c671a9e 100644 --- a/notifications/jms/src/main/java/org/trellisldp/jms/package-info.java +++ b/notifications/jms/src/main/java/org/trellisldp/jms/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/jms/src/test/java/org/trellisldp/jms/JmsEventServiceTest.java b/notifications/jms/src/test/java/org/trellisldp/jms/JmsEventServiceTest.java index 5d601539..2f944f5d 100644 --- a/notifications/jms/src/test/java/org/trellisldp/jms/JmsEventServiceTest.java +++ b/notifications/jms/src/test/java/org/trellisldp/jms/JmsEventServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/kafka/build.gradle b/notifications/kafka/build.gradle index dbf527c0..36e95105 100644 --- a/notifications/kafka/build.gradle +++ b/notifications/kafka/build.gradle @@ -20,7 +20,7 @@ dependencies { implementation "org.slf4j:slf4j-api:$slf4jVersion" testImplementation "ch.qos.logback:logback-classic:$logbackVersion" - testImplementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" testImplementation "org.apache.commons:commons-rdf-simple:$commonsRdfVersion" testImplementation "org.mockito:mockito-core:$mockitoVersion" testImplementation project(':trellis-event-jackson') diff --git a/notifications/kafka/src/main/java/module-info.java b/notifications/kafka/src/main/java/module-info.java index ea909134..3b11a7eb 100644 --- a/notifications/kafka/src/main/java/module-info.java +++ b/notifications/kafka/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,7 +17,7 @@ exports org.trellisldp.kafka; requires kafka.clients; - requires jakarta.inject.api; + requires jakarta.inject; requires microprofile.config.api; requires org.apache.commons.rdf.api; requires org.slf4j; diff --git a/notifications/kafka/src/main/java/org/trellisldp/kafka/KafkaEventService.java b/notifications/kafka/src/main/java/org/trellisldp/kafka/KafkaEventService.java index 0a4046f8..44f5189f 100644 --- a/notifications/kafka/src/main/java/org/trellisldp/kafka/KafkaEventService.java +++ b/notifications/kafka/src/main/java/org/trellisldp/kafka/KafkaEventService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/kafka/src/main/java/org/trellisldp/kafka/package-info.java b/notifications/kafka/src/main/java/org/trellisldp/kafka/package-info.java index ac1b3e7d..56c50022 100644 --- a/notifications/kafka/src/main/java/org/trellisldp/kafka/package-info.java +++ b/notifications/kafka/src/main/java/org/trellisldp/kafka/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/kafka/src/test/java/org/trellisldp/kafka/KafkaEventServiceTest.java b/notifications/kafka/src/test/java/org/trellisldp/kafka/KafkaEventServiceTest.java index 21d68614..8656a486 100644 --- a/notifications/kafka/src/test/java/org/trellisldp/kafka/KafkaEventServiceTest.java +++ b/notifications/kafka/src/test/java/org/trellisldp/kafka/KafkaEventServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/reactive/build.gradle b/notifications/reactive/build.gradle index 1e27f15e..2bd6b24f 100644 --- a/notifications/reactive/build.gradle +++ b/notifications/reactive/build.gradle @@ -19,7 +19,7 @@ dependencies { implementation "org.slf4j:slf4j-api:$slf4jVersion" testImplementation "ch.qos.logback:logback-classic:$logbackVersion" - testImplementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" testImplementation "io.smallrye.reactive:smallrye-reactive-streams-operators:$smallryeReactiveOperatorsVersion" testImplementation "io.smallrye.reactive:smallrye-reactive-messaging-provider:$smallryeReactiveVersion" testImplementation "org.apache.commons:commons-rdf-simple:$commonsRdfVersion" diff --git a/notifications/reactive/src/main/java/module-info.java b/notifications/reactive/src/main/java/module-info.java index b9539f61..ecfde2ca 100644 --- a/notifications/reactive/src/main/java/module-info.java +++ b/notifications/reactive/src/main/java/module-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,7 +17,7 @@ exports org.trellisldp.reactive; requires io.reactivex.rxjava2; - requires jakarta.inject.api; + requires jakarta.inject; requires microprofile.reactive.messaging.api; requires org.slf4j; requires org.apache.commons.rdf.api; diff --git a/notifications/reactive/src/main/java/org/trellisldp/reactive/ReactiveEventService.java b/notifications/reactive/src/main/java/org/trellisldp/reactive/ReactiveEventService.java index 9bd41899..7278ce7c 100644 --- a/notifications/reactive/src/main/java/org/trellisldp/reactive/ReactiveEventService.java +++ b/notifications/reactive/src/main/java/org/trellisldp/reactive/ReactiveEventService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/reactive/src/main/java/org/trellisldp/reactive/package-info.java b/notifications/reactive/src/main/java/org/trellisldp/reactive/package-info.java index b4e60248..92226290 100644 --- a/notifications/reactive/src/main/java/org/trellisldp/reactive/package-info.java +++ b/notifications/reactive/src/main/java/org/trellisldp/reactive/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/reactive/src/test/java/org/trellisldp/reactive/ReactiveEventServiceTest.java b/notifications/reactive/src/test/java/org/trellisldp/reactive/ReactiveEventServiceTest.java index 7f3b9610..cf8c3b62 100644 --- a/notifications/reactive/src/test/java/org/trellisldp/reactive/ReactiveEventServiceTest.java +++ b/notifications/reactive/src/test/java/org/trellisldp/reactive/ReactiveEventServiceTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/notifications/reactive/src/test/java/org/trellisldp/reactive/TestCollector.java b/notifications/reactive/src/test/java/org/trellisldp/reactive/TestCollector.java index 6ce398f8..dd8b21a9 100644 --- a/notifications/reactive/src/test/java/org/trellisldp/reactive/TestCollector.java +++ b/notifications/reactive/src/test/java/org/trellisldp/reactive/TestCollector.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/dropwizard/build.gradle b/platform/dropwizard/build.gradle index 15c18174..b8a996e5 100644 --- a/platform/dropwizard/build.gradle +++ b/platform/dropwizard/build.gradle @@ -25,7 +25,7 @@ dependencies { exclude group: 'org.apache.httpcomponents', module: 'httpcore-osgi' } implementation "commons-codec:commons-codec:$commonsCodecVersion" - implementation "io.smallrye:smallrye-config:$smallryeConfigVersion" + implementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" implementation "jakarta.activation:jakarta.activation-api:$activationApiVersion" implementation "jakarta.jms:jakarta.jms-api:$jmsApiVersion" implementation "jakarta.validation:jakarta.validation-api:$validationApiVersion" diff --git a/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/AppConfiguration.java b/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/AppConfiguration.java index 8305f4bb..a33d7950 100644 --- a/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/AppConfiguration.java +++ b/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/AppConfiguration.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.trellisldp.app.triplestore; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/AppUtils.java b/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/AppUtils.java index 1184a4cb..9c1d3c7a 100644 --- a/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/AppUtils.java +++ b/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/AppUtils.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/RDFConnectionHealthCheck.java b/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/RDFConnectionHealthCheck.java index 3b598b18..21cf7ac2 100644 --- a/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/RDFConnectionHealthCheck.java +++ b/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/RDFConnectionHealthCheck.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/TrellisApplication.java b/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/TrellisApplication.java index 54219dbf..6f0fd256 100644 --- a/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/TrellisApplication.java +++ b/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/TrellisApplication.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/TrellisServiceBundler.java b/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/TrellisServiceBundler.java index 36bcafda..8a3ba89c 100644 --- a/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/TrellisServiceBundler.java +++ b/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/TrellisServiceBundler.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/package-info.java b/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/package-info.java index d8acf3a3..3cf8b70c 100644 --- a/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/package-info.java +++ b/platform/dropwizard/src/main/java/org/trellisldp/app/triplestore/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/dropwizard/src/test/java/org/trellisldp/app/triplestore/AppUtilsTest.java b/platform/dropwizard/src/test/java/org/trellisldp/app/triplestore/AppUtilsTest.java index 7f16e899..aac4f06f 100644 --- a/platform/dropwizard/src/test/java/org/trellisldp/app/triplestore/AppUtilsTest.java +++ b/platform/dropwizard/src/test/java/org/trellisldp/app/triplestore/AppUtilsTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/dropwizard/src/test/java/org/trellisldp/app/triplestore/RDFConnectionHealthCheckTest.java b/platform/dropwizard/src/test/java/org/trellisldp/app/triplestore/RDFConnectionHealthCheckTest.java index a241bed6..af17ac18 100644 --- a/platform/dropwizard/src/test/java/org/trellisldp/app/triplestore/RDFConnectionHealthCheckTest.java +++ b/platform/dropwizard/src/test/java/org/trellisldp/app/triplestore/RDFConnectionHealthCheckTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/dropwizard/src/test/java/org/trellisldp/app/triplestore/TrellisApplicationTest.java b/platform/dropwizard/src/test/java/org/trellisldp/app/triplestore/TrellisApplicationTest.java index ffacbb5f..4157e918 100644 --- a/platform/dropwizard/src/test/java/org/trellisldp/app/triplestore/TrellisApplicationTest.java +++ b/platform/dropwizard/src/test/java/org/trellisldp/app/triplestore/TrellisApplicationTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/dropwizard/src/test/java/org/trellisldp/app/triplestore/TrellisConfigurationTest.java b/platform/dropwizard/src/test/java/org/trellisldp/app/triplestore/TrellisConfigurationTest.java index 0f34523d..3e5ae2ae 100644 --- a/platform/dropwizard/src/test/java/org/trellisldp/app/triplestore/TrellisConfigurationTest.java +++ b/platform/dropwizard/src/test/java/org/trellisldp/app/triplestore/TrellisConfigurationTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/karaf/src/main/resources/features.xml b/platform/karaf/src/main/resources/features.xml index 6c9c655e..7cd19ea6 100644 --- a/platform/karaf/src/main/resources/features.xml +++ b/platform/karaf/src/main/resources/features.xml @@ -271,6 +271,10 @@ mvn:jakarta.xml.bind/jakarta.xml.bind-api/${jaxbApiVersion} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax-inject/1_2 mvn:org.eclipse.microprofile.config/microprofile-config-api/${microprofileConfigVersion} + mvn:com.google.guava/guava/${guavaVersion} + mvn:com.google.guava/failureaccess/${failureaccessVersion} + + mvn:org.trellisldp/trellis-cache/${project.version} mvn:org.trellisldp/trellis-auth-oauth/${project.version} diff --git a/platform/openliberty/build.gradle b/platform/openliberty/build.gradle index e0b54a38..ab3fc9b3 100644 --- a/platform/openliberty/build.gradle +++ b/platform/openliberty/build.gradle @@ -55,7 +55,7 @@ dependencies { testImplementation project(':trellis-test') - testImplementation("io.smallrye:smallrye-config:$smallryeConfigVersion") + testImplementation("io.smallrye.config:smallrye-config:$smallryeConfigVersion") testImplementation("org.apache.cxf:cxf-rt-rs-client:$cxfVersion") testImplementation("org.awaitility:awaitility:$awaitilityVersion") { exclude group: "org.hamcrest", module: 'hamcrest-core' diff --git a/platform/openliberty/src/main/java/org/trellisldp/openliberty/TrellisServiceSupplier.java b/platform/openliberty/src/main/java/org/trellisldp/openliberty/TrellisServiceSupplier.java index 1145a0a6..b20f23f5 100644 --- a/platform/openliberty/src/main/java/org/trellisldp/openliberty/TrellisServiceSupplier.java +++ b/platform/openliberty/src/main/java/org/trellisldp/openliberty/TrellisServiceSupplier.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/openliberty/src/main/java/org/trellisldp/openliberty/WebApplication.java b/platform/openliberty/src/main/java/org/trellisldp/openliberty/WebApplication.java index b91998f9..0c7c6654 100644 --- a/platform/openliberty/src/main/java/org/trellisldp/openliberty/WebApplication.java +++ b/platform/openliberty/src/main/java/org/trellisldp/openliberty/WebApplication.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/openliberty/src/main/java/org/trellisldp/openliberty/package-info.java b/platform/openliberty/src/main/java/org/trellisldp/openliberty/package-info.java index 6a8c23b5..f380e50d 100644 --- a/platform/openliberty/src/main/java/org/trellisldp/openliberty/package-info.java +++ b/platform/openliberty/src/main/java/org/trellisldp/openliberty/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * A MicroProfile-based Trellis application. */ diff --git a/platform/openliberty/src/test/java/org/trellisldp/openliberty/TrellisApplicationTest.java b/platform/openliberty/src/test/java/org/trellisldp/openliberty/TrellisApplicationTest.java index c3babf7b..25b8e515 100644 --- a/platform/openliberty/src/test/java/org/trellisldp/openliberty/TrellisApplicationTest.java +++ b/platform/openliberty/src/test/java/org/trellisldp/openliberty/TrellisApplicationTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/osgi/src/test/java/org/trellisldp/osgi/OSGiTest.java b/platform/osgi/src/test/java/org/trellisldp/osgi/OSGiTest.java index 85e66da6..3691bf88 100644 --- a/platform/osgi/src/test/java/org/trellisldp/osgi/OSGiTest.java +++ b/platform/osgi/src/test/java/org/trellisldp/osgi/OSGiTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/quarkus/build.gradle b/platform/quarkus/build.gradle index e1abfc87..c80dd897 100644 --- a/platform/quarkus/build.gradle +++ b/platform/quarkus/build.gradle @@ -2,60 +2,9 @@ plugins { id 'io.quarkus' } -repositories { - mavenLocal() { - content { - includeGroup "org.trellisldp" - } - } - mavenCentral() - // This is required for snyk integration with the quarkus project - // Once quarkus has better support for multi-project builds, this can be removed - maven { - url "https://oss.sonatype.org/content/repositories/snapshots" - } -} - -def installForQuarkus = [ - "trellis-api", - "trellis-app", - "trellis-audit", - "trellis-auth-jwt", - "trellis-cache", - "trellis-cdi", - "trellis-constraint-rules", - "trellis-event-jsonb", - "trellis-file", - "trellis-http", - "trellis-io-jena", - "trellis-namespaces", - "trellis-rdfa", - "trellis-reactive", - "trellis-triplestore", - "trellis-vocabulary", - "trellis-webac" -] - dependencies { - implementation enforcedPlatform("io.quarkus:quarkus-bom:$quarkusVersion") - - implementation "org.trellisldp:trellis-api:${project.version}" - implementation "org.trellisldp:trellis-app:${project.version}" - implementation "org.trellisldp:trellis-audit:${project.version}" - implementation "org.trellisldp:trellis-auth-jwt:${project.version}" - implementation "org.trellisldp:trellis-cache:${project.version}" - implementation "org.trellisldp:trellis-cdi:${project.version}" - implementation "org.trellisldp:trellis-constraint-rules:${project.version}" - implementation "org.trellisldp:trellis-event-jsonb:${project.version}" - implementation "org.trellisldp:trellis-file:${project.version}" - implementation "org.trellisldp:trellis-http:${project.version}" - implementation "org.trellisldp:trellis-io-jena:${project.version}" - implementation "org.trellisldp:trellis-namespaces:${project.version}" - implementation "org.trellisldp:trellis-rdfa:${project.version}" - implementation "org.trellisldp:trellis-reactive:${project.version}" - implementation "org.trellisldp:trellis-triplestore:${project.version}" - implementation "org.trellisldp:trellis-vocabulary:${project.version}" - implementation "org.trellisldp:trellis-webac:${project.version}" + implementation platform("io.quarkus:quarkus-bom:$quarkusVersion") + implementation platform("io.netty:netty-bom:$nettyVersion") implementation 'io.quarkus:quarkus-jsonb' implementation 'io.quarkus:quarkus-resteasy' @@ -69,10 +18,29 @@ dependencies { implementation "com.github.jsonld-java:jsonld-java:$jsonldVersion" implementation "com.github.spullara.mustache.java:compiler:$mustacheVersion" implementation "com.google.guava:guava:$guavaVersion" + implementation "commons-codec:commons-codec:$commonsCodecVersion" implementation "org.apache.jena:jena-arq:$jenaVersion" implementation "org.apache.jena:jena-rdfconnection:$jenaVersion" implementation "org.apache.jena:jena-tdb2:$jenaVersion" + implementation project(":trellis-api") + implementation project(":trellis-app") + implementation project(":trellis-audit") + implementation project(":trellis-auth-jwt") + implementation project(":trellis-cache") + implementation project(":trellis-cdi") + implementation project(":trellis-constraint-rules") + implementation project(":trellis-event-jsonb") + implementation project(":trellis-file") + implementation project(":trellis-http") + implementation project(":trellis-io-jena") + implementation project(":trellis-namespaces") + implementation project(":trellis-rdfa") + implementation project(":trellis-reactive") + implementation project(":trellis-triplestore") + implementation project(":trellis-vocabulary") + implementation project(":trellis-webac") + runtimeOnly "jakarta.activation:jakarta.activation-api:$activationApiVersion" runtimeOnly "jakarta.xml.bind:jakarta.xml.bind-api:$jaxbApiVersion" @@ -96,12 +64,6 @@ sonarqube { skipProject = true } -rootProject.childProjects.each { n, p -> - if (installForQuarkus.contains(p.name)) { - tasks.compileJava.dependsOn p.tasks.install - } -} - buildNative.enabled = false java { @@ -111,9 +73,3 @@ java { } } -// This subproject is not part of the release and its dependencies should not -// be considered during the release process. -release { - ignoredSnapshotDependencies = installForQuarkus.collect { "org.trellisldp:" + it } -} - diff --git a/platform/quarkus/src/main/java/org/trellisldp/quarkus/AuthorizationCache.java b/platform/quarkus/src/main/java/org/trellisldp/quarkus/AuthorizationCache.java index 2fc0c81d..531263ca 100644 --- a/platform/quarkus/src/main/java/org/trellisldp/quarkus/AuthorizationCache.java +++ b/platform/quarkus/src/main/java/org/trellisldp/quarkus/AuthorizationCache.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/quarkus/src/main/java/org/trellisldp/quarkus/ProfileCache.java b/platform/quarkus/src/main/java/org/trellisldp/quarkus/ProfileCache.java index 31fbe84d..087c9b76 100644 --- a/platform/quarkus/src/main/java/org/trellisldp/quarkus/ProfileCache.java +++ b/platform/quarkus/src/main/java/org/trellisldp/quarkus/ProfileCache.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/quarkus/src/main/java/org/trellisldp/quarkus/ServiceProviders.java b/platform/quarkus/src/main/java/org/trellisldp/quarkus/ServiceProviders.java index a6718d72..b1c4531c 100644 --- a/platform/quarkus/src/main/java/org/trellisldp/quarkus/ServiceProviders.java +++ b/platform/quarkus/src/main/java/org/trellisldp/quarkus/ServiceProviders.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/quarkus/src/main/java/org/trellisldp/quarkus/TrellisApplication.java b/platform/quarkus/src/main/java/org/trellisldp/quarkus/TrellisApplication.java index 78c1930b..cd5a4bda 100644 --- a/platform/quarkus/src/main/java/org/trellisldp/quarkus/TrellisApplication.java +++ b/platform/quarkus/src/main/java/org/trellisldp/quarkus/TrellisApplication.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/quarkus/src/main/java/org/trellisldp/quarkus/package-info.java b/platform/quarkus/src/main/java/org/trellisldp/quarkus/package-info.java index 1617f289..a08e12f7 100644 --- a/platform/quarkus/src/main/java/org/trellisldp/quarkus/package-info.java +++ b/platform/quarkus/src/main/java/org/trellisldp/quarkus/package-info.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * A MicroProfile-based Trellis application. */ diff --git a/platform/quarkus/src/test/java/org/trellisldp/quarkus/ApplicationTest.java b/platform/quarkus/src/test/java/org/trellisldp/quarkus/ApplicationTest.java index 99339b60..04ef7039 100644 --- a/platform/quarkus/src/test/java/org/trellisldp/quarkus/ApplicationTest.java +++ b/platform/quarkus/src/test/java/org/trellisldp/quarkus/ApplicationTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/quarkus/src/test/java/org/trellisldp/quarkus/LdpTest.java b/platform/quarkus/src/test/java/org/trellisldp/quarkus/LdpTest.java index 85768318..9d50c85b 100644 --- a/platform/quarkus/src/test/java/org/trellisldp/quarkus/LdpTest.java +++ b/platform/quarkus/src/test/java/org/trellisldp/quarkus/LdpTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/platform/quarkus/src/test/java/org/trellisldp/quarkus/MementoTest.java b/platform/quarkus/src/test/java/org/trellisldp/quarkus/MementoTest.java index 45d36f3a..e847b95a 100644 --- a/platform/quarkus/src/test/java/org/trellisldp/quarkus/MementoTest.java +++ b/platform/quarkus/src/test/java/org/trellisldp/quarkus/MementoTest.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2020 Aaron Coburn and individual contributors + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/settings.gradle b/settings.gradle index 8aa7730c..1c83d444 100755 --- a/settings.gradle +++ b/settings.gradle @@ -5,8 +5,8 @@ pluginManagement { } plugins { id 'biz.aQute.bnd.builder' version "4.1.0" - id 'info.solidsoft.pitest' version "1.4.8" - id 'io.quarkus' version "1.3.2.Final" + id 'info.solidsoft.pitest' version "1.4.9" + id 'io.quarkus' version "1.4.2.Final" id "net.wasdev.wlp.gradle.plugins.Liberty" version "2.7" } }