diff options
Diffstat (limited to 'modules/core_common_webapp')
3 files changed, 30 insertions, 13 deletions
diff --git a/modules/core_common_webapp/pom.xml b/modules/core_common_webapp/pom.xml index a7090761..4121a8f3 100644 --- a/modules/core_common_webapp/pom.xml +++ b/modules/core_common_webapp/pom.xml @@ -21,6 +21,10 @@ <groupId>at.asitplus.eidas.ms_specific</groupId> <artifactId>core_common_lib</artifactId> </dependency> + <dependency> + <groupId>at.asitplus.eidas.ms_specific.modules</groupId> + <artifactId>eidas_proxy-sevice</artifactId> + </dependency> <dependency> <groupId>at.gv.egiz.eaaf</groupId> @@ -60,9 +64,25 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-test</artifactId> + <groupId>org.powermock</groupId> + <artifactId>powermock-module-junit4</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-api-mockito2</artifactId> <scope>test</scope> + </dependency> + <dependency> + <groupId>com.squareup.okhttp3</groupId> + <artifactId>mockwebserver</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>at.asitplus.eidas.ms_specific</groupId> + <artifactId>core_common_lib</artifactId> + <scope>test</scope> + <type>test-jar</type> </dependency> <dependency> <groupId>at.gv.egiz.eaaf</groupId> @@ -92,14 +112,7 @@ <artifactId>eaaf_module_pvp2_idp</artifactId> <scope>test</scope> <type>test-jar</type> - </dependency> - <dependency> - <groupId>com.squareup.okhttp3</groupId> - <artifactId>mockwebserver</artifactId> - <scope>test</scope> </dependency> - - </dependencies> <build> diff --git a/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/provider/StatusMessageProvider.java b/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/provider/StatusMessageProvider.java index 39543fe4..cd913af2 100644 --- a/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/provider/StatusMessageProvider.java +++ b/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/provider/StatusMessageProvider.java @@ -44,6 +44,7 @@ import lombok.extern.slf4j.Slf4j; @Slf4j public class StatusMessageProvider implements IStatusMessenger, MessageSourceAware { + private static final String ERROR_MESSAGES_UNAVAILABLE = "Error messages can NOT be load from application. Only errorCode: {0} is availabe"; private static final String ERROR_NO_MESSAGE = "No errormesseage for error with number.={0}"; @@ -56,14 +57,15 @@ public class StatusMessageProvider implements IStatusMessenger, MessageSourceAwa private static final String MSG_WARN_NO_SOURCE = "MessageCode: {} is NOT SET for locale: {}"; private static final String MSG_INFO = "Use locale: {} as default"; - private MessageSource messageSource; - // external error codes private static final String DEFAULT_EXTERNALERROR_RESOURCES = "properties/external_statuscodes_map"; private static final Locale DEFAULT_EXTERNALERROR_LOCALES = new Locale("en", "GB"); private ResourceBundle externalError = null; + //internal messanges + private MessageSource messageSource; + @Override public String getMessageWithoutDefault(final String messageId, final Object[] parameters) { if (messageSource == null) { @@ -86,6 +88,7 @@ public class StatusMessageProvider implements IStatusMessenger, MessageSourceAwa } + } catch (final MissingResourceException e2) { log.warn("No message source", e2); @@ -101,6 +104,7 @@ public class StatusMessageProvider implements IStatusMessenger, MessageSourceAwa if (messageSource == null) { return MessageFormat.format(ERROR_MESSAGES_UNAVAILABLE, new Object[]{messageId}); + } else { try { final Locale locale = LocaleContextHolder.getLocale(); @@ -124,7 +128,7 @@ public class StatusMessageProvider implements IStatusMessenger, MessageSourceAwa } } } - + @Override public String getResponseErrorCode(Throwable throwable) { String errorCode = IStatusMessenger.CODES_EXTERNAL_ERROR_GENERIC; diff --git a/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/storage/EidasCacheTransactionStoreDecorator.java b/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/storage/EidasCacheTransactionStoreDecorator.java index 9b1c8eae..5a59a4e0 100644 --- a/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/storage/EidasCacheTransactionStoreDecorator.java +++ b/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/storage/EidasCacheTransactionStoreDecorator.java @@ -171,7 +171,7 @@ public class EidasCacheTransactionStoreDecorator implements ITransactionStorage, @Override public void remove(String key) { if (containsKey(key)) { - log.debug("Remove element with key: " + key + " from " + ITransactionStorage.class.getName()); + log.trace("Remove element with key: " + key + " from " + ITransactionStorage.class.getName()); boolean delResult = storage.remove(key); log.trace("Object: {} removed from cache: {}", key, delResult); |