diff --git a/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/adapter/README.txt b/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/adapter/README.txt deleted file mode 100644 index f9f3a064a8060a6fac7ac2caba057ac521732a1d..0000000000000000000000000000000000000000 --- a/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/adapter/README.txt +++ /dev/null @@ -1,5 +0,0 @@ -Put here classes from adapter layer : -Data transformers, adapters, presenters or DAO. Abstraction of external libraries for -application or business use. -Web-services point, sockets, database connection and pool, GUI, file system, framework, -external libraries. \ No newline at end of file diff --git a/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/README.txt b/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/README.txt deleted file mode 100644 index 13b8d86e92813836491d776f448dfd3f0a81628f..0000000000000000000000000000000000000000 --- a/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -Put here classes from application layer : -Use cases. Business elements applied in an application context or scenario. \ No newline at end of file diff --git a/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/TokenGenerator.java b/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/TokenGenerator.java index 68890206eef20f8af3d6624fa6793d817270b4ac..de715c8cab2d25716f07fab6e819b493ef39bdf2 100644 --- a/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/TokenGenerator.java +++ b/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/TokenGenerator.java @@ -15,13 +15,15 @@ import net.ihe.gazelle.sb.jwtstandardblock.business.jwt.JSONWebSignature; import net.ihe.gazelle.sb.jwtstandardblock.business.jwt.JSONWebToken; import net.ihe.gazelle.sb.jwtstandardblock.business.jwt.JSONWebTokenClaimSet; -import javax.inject.Inject; import java.nio.charset.StandardCharsets; import java.time.Duration; import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.UUID; +/** + * Class to generate the token + */ public class TokenGenerator { private static final String ALGORITHM = "HS256"; @@ -31,7 +33,6 @@ public class TokenGenerator { private AudienceSecretRetriever audienceSecretRetriever; - @Inject public void setAudienceSecretRetriever(AudienceSecretRetriever audienceSecretRetriever) { this.audienceSecretRetriever = audienceSecretRetriever; } diff --git a/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/TokenRequestException.java b/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/TokenRequestException.java index 31af84de9958527667589aca761175ba43cc7972..a22ea5ce4a77509c16a7ea1bc778ec739761cbc9 100644 --- a/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/TokenRequestException.java +++ b/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/TokenRequestException.java @@ -1,5 +1,8 @@ package net.ihe.gazelle.app.accesstokenproviderapi.application; +/** + * Class to manage token request exception + */ public class TokenRequestException extends Exception { /** diff --git a/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/exception/UnsupportedAlgorithmException.java b/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/exception/UnsupportedAlgorithmException.java index 2ac783530779a20749f2c94405dbd4a95ea8062e..078073b5cbc40046e0a9a44d6ff7fe23da43b94c 100644 --- a/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/exception/UnsupportedAlgorithmException.java +++ b/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/exception/UnsupportedAlgorithmException.java @@ -1,7 +1,9 @@ package net.ihe.gazelle.app.accesstokenproviderapi.application.exception; +/** + * Class to manage unsupported algorithm exception + */ public class UnsupportedAlgorithmException extends Exception { - } diff --git a/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/exception/UnsupportedTokenTypeException.java b/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/exception/UnsupportedTokenTypeException.java index 41d342f2a24024428f657316e96dcc41740c0599..829eb6d52890330adba910c1fe63dac9fced6b98 100644 --- a/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/exception/UnsupportedTokenTypeException.java +++ b/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/application/exception/UnsupportedTokenTypeException.java @@ -1,4 +1,7 @@ package net.ihe.gazelle.app.accesstokenproviderapi.application.exception; +/** + * Class to manage unsupported token exception + */ public class UnsupportedTokenTypeException extends Exception { } diff --git a/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/business/README.txt b/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/business/README.txt deleted file mode 100644 index 277b09a0363f09d1d11ebcc56460392a69e4b60b..0000000000000000000000000000000000000000 --- a/access-token-provider-api/src/main/java/net/ihe/gazelle/app/accesstokenproviderapi/business/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -Put here classes from business layer : -Business model, rules and constraints. Always true. Independent from the application. \ No newline at end of file diff --git a/access-token-provider-api/src/test/java/net/ihe/gazelle/app/accesstokenproviderapi/adapter/README.txt b/access-token-provider-api/src/test/java/net/ihe/gazelle/app/accesstokenproviderapi/adapter/README.txt deleted file mode 100644 index ddaf15eb40c83e30470f2655d8071850c8b5c610..0000000000000000000000000000000000000000 --- a/access-token-provider-api/src/test/java/net/ihe/gazelle/app/accesstokenproviderapi/adapter/README.txt +++ /dev/null @@ -1 +0,0 @@ -Put here test classes for adapter layer. \ No newline at end of file diff --git a/access-token-provider-api/src/test/java/net/ihe/gazelle/app/accesstokenproviderapi/application/AudienceSecretRetrieverTestImpl.java b/access-token-provider-api/src/test/java/net/ihe/gazelle/app/accesstokenproviderapi/application/AudienceSecretRetrieverTestImpl.java index 766019cbdf4cccc3e2ccf91b17a31eb1bf3e4f28..30d64acf5434d75e08c05a022231d694e4ca5389 100644 --- a/access-token-provider-api/src/test/java/net/ihe/gazelle/app/accesstokenproviderapi/application/AudienceSecretRetrieverTestImpl.java +++ b/access-token-provider-api/src/test/java/net/ihe/gazelle/app/accesstokenproviderapi/application/AudienceSecretRetrieverTestImpl.java @@ -5,6 +5,9 @@ import net.ihe.gazelle.app.audienceretriever.application.AudienceSecretRetriever import java.util.HashMap; import java.util.Map; +/** + * Class to test the retriever of the audience secret + */ public class AudienceSecretRetrieverTestImpl implements AudienceSecretRetriever { private Map<String, String> registry = new HashMap<>(); diff --git a/access-token-provider-api/src/test/java/net/ihe/gazelle/app/accesstokenproviderapi/application/DummyAuthzServerSoapuiTest.java b/access-token-provider-api/src/test/java/net/ihe/gazelle/app/accesstokenproviderapi/application/DummyAuthzServerSoapuiTest.java index d580ad3c4c949bebf9c0ebf61e3207b28bdac7b7..1fb14a903b8a14b6e8916014773c68654f8a5357 100644 --- a/access-token-provider-api/src/test/java/net/ihe/gazelle/app/accesstokenproviderapi/application/DummyAuthzServerSoapuiTest.java +++ b/access-token-provider-api/src/test/java/net/ihe/gazelle/app/accesstokenproviderapi/application/DummyAuthzServerSoapuiTest.java @@ -1,8 +1,13 @@ package net.ihe.gazelle.app.accesstokenproviderapi.application; import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; + +/** + * Class to test the soapui authorization server + */ class DummyAuthzServerSoapuiTest { private static final String SUBJECT = "aamrein"; @@ -13,11 +18,11 @@ class DummyAuthzServerSoapuiTest { */ @Test public void getAccessTokenWithPathAudienceTest() { - DummyAuthzServerSoapui dummyAuthzServer = new DummyAuthzServerSoapui("src/test/resources/audience.properties"); + DummyAuthzServerSoapui dummyAuthzServer = new DummyAuthzServerSoapui(); dummyAuthzServer.setAudienceSecretRetriever((String audience) -> "myBeautifulKeyWhichIsAJWTSecretSoSecret"); - assertNotNull(dummyAuthzServer.getAccessToken(SUBJECT, AUDIENCE, null, null)); + assertNotNull(dummyAuthzServer.getAccessToken(SUBJECT, AUDIENCE, null, null), "check that the access token is not null"); } /** @@ -28,7 +33,7 @@ class DummyAuthzServerSoapuiTest { DummyAuthzServerSoapui dummyAuthzServer = new DummyAuthzServerSoapui(); dummyAuthzServer.setAudienceSecretRetriever((String audience) -> "myBeautifulKeyWhichIsAJWTSecretSoSecret"); - assertNotNull(dummyAuthzServer.getAccessToken(SUBJECT, AUDIENCE, null, null)); + assertNotNull(dummyAuthzServer.getAccessToken(SUBJECT, AUDIENCE, null, null), "check that the access token is not null"); } /** @@ -37,6 +42,6 @@ class DummyAuthzServerSoapuiTest { @Test public void getAccessTokenWithBadPathAudienceTest() { DummyAuthzServerSoapui dummyAuthzServer = new DummyAuthzServerSoapui("test.properties"); - assertNull(dummyAuthzServer.getAccessToken(SUBJECT, AUDIENCE, null, null)); + assertNull(dummyAuthzServer.getAccessToken(SUBJECT, AUDIENCE, null, null), "check that the access token is null"); } } diff --git a/access-token-provider-api/src/test/java/net/ihe/gazelle/app/accesstokenproviderapi/application/README.txt b/access-token-provider-api/src/test/java/net/ihe/gazelle/app/accesstokenproviderapi/application/README.txt deleted file mode 100644 index fe1a7edcdb8e895cbfdcbfd15031c15da130d006..0000000000000000000000000000000000000000 --- a/access-token-provider-api/src/test/java/net/ihe/gazelle/app/accesstokenproviderapi/application/README.txt +++ /dev/null @@ -1 +0,0 @@ -Put here test classes for application layer. \ No newline at end of file diff --git a/access-token-provider-api/src/test/java/net/ihe/gazelle/app/accesstokenproviderapi/business/README.txt b/access-token-provider-api/src/test/java/net/ihe/gazelle/app/accesstokenproviderapi/business/README.txt deleted file mode 100644 index 9ab90c5deabdf0ede124604e6bb6d00ed83e7b8c..0000000000000000000000000000000000000000 --- a/access-token-provider-api/src/test/java/net/ihe/gazelle/app/accesstokenproviderapi/business/README.txt +++ /dev/null @@ -1 +0,0 @@ -Put here test classes for business layer. \ No newline at end of file diff --git a/access-token-provider-api/src/test/resources/README.txt b/access-token-provider-api/src/test/resources/README.txt deleted file mode 100644 index c6f818dec4fc4af999ff9c6b505592351a4c9e14..0000000000000000000000000000000000000000 --- a/access-token-provider-api/src/test/resources/README.txt +++ /dev/null @@ -1 +0,0 @@ -Put here your test resources. \ No newline at end of file diff --git a/audience-retriever/src/main/java/net/ihe/gazelle/app/audienceretriever/adapter/README.txt b/audience-retriever/src/main/java/net/ihe/gazelle/app/audienceretriever/adapter/README.txt deleted file mode 100644 index f9f3a064a8060a6fac7ac2caba057ac521732a1d..0000000000000000000000000000000000000000 --- a/audience-retriever/src/main/java/net/ihe/gazelle/app/audienceretriever/adapter/README.txt +++ /dev/null @@ -1,5 +0,0 @@ -Put here classes from adapter layer : -Data transformers, adapters, presenters or DAO. Abstraction of external libraries for -application or business use. -Web-services point, sockets, database connection and pool, GUI, file system, framework, -external libraries. \ No newline at end of file diff --git a/audience-retriever/src/main/java/net/ihe/gazelle/app/audienceretriever/application/README.txt b/audience-retriever/src/main/java/net/ihe/gazelle/app/audienceretriever/application/README.txt deleted file mode 100644 index 13b8d86e92813836491d776f448dfd3f0a81628f..0000000000000000000000000000000000000000 --- a/audience-retriever/src/main/java/net/ihe/gazelle/app/audienceretriever/application/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -Put here classes from application layer : -Use cases. Business elements applied in an application context or scenario. \ No newline at end of file diff --git a/audience-retriever/src/main/java/net/ihe/gazelle/app/audienceretriever/business/README.txt b/audience-retriever/src/main/java/net/ihe/gazelle/app/audienceretriever/business/README.txt deleted file mode 100644 index 277b09a0363f09d1d11ebcc56460392a69e4b60b..0000000000000000000000000000000000000000 --- a/audience-retriever/src/main/java/net/ihe/gazelle/app/audienceretriever/business/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -Put here classes from business layer : -Business model, rules and constraints. Always true. Independent from the application. \ No newline at end of file diff --git a/audience-retriever/src/test/java/net/ihe/gazelle/app/audienceretriever/adapter/AudienceSecretRetrieverForSoapuiTest.java b/audience-retriever/src/test/java/net/ihe/gazelle/app/audienceretriever/adapter/AudienceSecretRetrieverForSoapuiTest.java index c78f92ddd39ca2c39ba36abd8d80231ed53799b7..1bd78af9d12c196521be2678d8b6166ff17f10ac 100644 --- a/audience-retriever/src/test/java/net/ihe/gazelle/app/audienceretriever/adapter/AudienceSecretRetrieverForSoapuiTest.java +++ b/audience-retriever/src/test/java/net/ihe/gazelle/app/audienceretriever/adapter/AudienceSecretRetrieverForSoapuiTest.java @@ -5,6 +5,9 @@ import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertNull; +/** + * Class to test the retrieve of the audience secret + */ class AudienceSecretRetrieverForSoapuiTest { @Test diff --git a/audience-retriever/src/test/java/net/ihe/gazelle/app/audienceretriever/adapter/README.txt b/audience-retriever/src/test/java/net/ihe/gazelle/app/audienceretriever/adapter/README.txt deleted file mode 100644 index ddaf15eb40c83e30470f2655d8071850c8b5c610..0000000000000000000000000000000000000000 --- a/audience-retriever/src/test/java/net/ihe/gazelle/app/audienceretriever/adapter/README.txt +++ /dev/null @@ -1 +0,0 @@ -Put here test classes for adapter layer. \ No newline at end of file diff --git a/audience-retriever/src/test/java/net/ihe/gazelle/app/audienceretriever/application/README.txt b/audience-retriever/src/test/java/net/ihe/gazelle/app/audienceretriever/application/README.txt deleted file mode 100644 index fe1a7edcdb8e895cbfdcbfd15031c15da130d006..0000000000000000000000000000000000000000 --- a/audience-retriever/src/test/java/net/ihe/gazelle/app/audienceretriever/application/README.txt +++ /dev/null @@ -1 +0,0 @@ -Put here test classes for application layer. \ No newline at end of file diff --git a/audience-retriever/src/test/java/net/ihe/gazelle/app/audienceretriever/business/README.txt b/audience-retriever/src/test/java/net/ihe/gazelle/app/audienceretriever/business/README.txt deleted file mode 100644 index 9ab90c5deabdf0ede124604e6bb6d00ed83e7b8c..0000000000000000000000000000000000000000 --- a/audience-retriever/src/test/java/net/ihe/gazelle/app/audienceretriever/business/README.txt +++ /dev/null @@ -1 +0,0 @@ -Put here test classes for business layer. \ No newline at end of file diff --git a/audience-retriever/src/test/resources/README.txt b/audience-retriever/src/test/resources/README.txt deleted file mode 100644 index c6f818dec4fc4af999ff9c6b505592351a4c9e14..0000000000000000000000000000000000000000 --- a/audience-retriever/src/test/resources/README.txt +++ /dev/null @@ -1 +0,0 @@ -Put here your test resources. \ No newline at end of file