diff --git a/build.gradle b/build.gradle index 9446e958..6993c6bc 100644 --- a/build.gradle +++ b/build.gradle @@ -45,8 +45,13 @@ dependencies { implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.17.1' implementation 'com.opencsv:opencsv:5.9' - implementation "org.codeforamerica.platform:form-flow:${formFlowLibraryVersion}" - println "📚Using form flow library ${formFlowLibraryVersion}" + if (profile == 'dev' || useLocalLibrary == 'true') { + implementation fileTree(dir: "$rootDir/../form-flow/build/libs", include: '*.jar') + println "📦 Using local library" + } else { + implementation "org.codeforamerica.platform:form-flow:${formFlowLibraryVersion}" + println "📚Using form flow library ${formFlowLibraryVersion}" + } implementation 'com.amazonaws:aws-encryption-sdk-java:3.0.0' implementation 'org.bouncycastle:bcpg-jdk15on:1.70' diff --git a/src/main/java/org/mdbenefits/app/StaticPageController.java b/src/main/java/org/mdbenefits/app/StaticPageController.java index a5a9ae77..e9ba2309 100644 --- a/src/main/java/org/mdbenefits/app/StaticPageController.java +++ b/src/main/java/org/mdbenefits/app/StaticPageController.java @@ -23,12 +23,14 @@ public class StaticPageController { @GetMapping("/") ModelAndView getIndex(HttpServletRequest request) { HttpSession httpSession = request.getSession(false); + if (httpSession != null) { httpSession.invalidate(); } Map model = new HashMap<>(); model.put("screen", "/"); + model.put("sessionBad", request.getParameter("sessionBad")); return new ModelAndView("index", model); } diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index ee32b84d..716423c8 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -1,6 +1,7 @@ form-flow: session-continuity-interceptor: enabled: true + redirect-url: '/?sessionTimeout=true' lock-after-submitted: - flow: mdBenefitsFlow redirect: confirmation @@ -77,7 +78,7 @@ spring: max-file-size: ${form-flow.uploads.max-file-size}MB max-request-size: ${form-flow.uploads.max-file-size}MB session: - timeout: 30M + timeout: 5M store-type: jdbc jdbc: initialize-schema: always diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties index 5be2102d..fd5fe85f 100644 --- a/src/main/resources/messages.properties +++ b/src/main/resources/messages.properties @@ -23,6 +23,7 @@ general.good-news=Good news! general.i-dont-know=I don't know general.not-interested=No, I\u2019m not interested general.ok-thanks=Ok, thanks +general.session-timeout=Your browser session expired. To protect your data, the session expires after 30 minutes of inactivity on this website. error.character-length=Provide an account number with less than 30 characters. error.error=Error error.uh-oh=Uh oh! diff --git a/src/main/resources/static/assets/css/custom.css b/src/main/resources/static/assets/css/custom.css index 98d64bb8..02a2d49e 100644 --- a/src/main/resources/static/assets/css/custom.css +++ b/src/main/resources/static/assets/css/custom.css @@ -514,4 +514,9 @@ li li { .email-confirmation-text { color: #00891B; font-weight: bold; +} + +.session-timeout-message { + padding: 2rem; + background-color: #ED9B06 } \ No newline at end of file diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index d5077e99..f5c64502 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -12,6 +12,11 @@
+ +
+

+
+