This repository was archived by the owner on May 5, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
sormas-backend/src/main/java/de/symeda/sormas/backend/externaljournal Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6161@ LocalBean
6262public class ExternalJournalService {
6363
64- private static final String SYMPTOM_JOURNAL_KEY = "symptomJournal" ;
6564 private static final String PATIENT_DIARY_KEY = "patientDiary" ;
6665 private static final Cache <String , String > authTokenCache = CacheBuilder .newBuilder ().expireAfterWrite (6 , TimeUnit .HOURS ).build ();
6766 private static final int NOT_FOUND_STATUS = 404 ;
@@ -76,17 +75,13 @@ public class ExternalJournalService {
7675 private PersonFacadeEjb .PersonFacadeEjbLocal personFacade ;
7776
7877 /**
79- * Retrieves a token used for authenticating in the symptom journal. The token will be cached.
80- *
78+ * Retrieves a token used for authenticating in the symptom journal.
79+ * The token will not be cached since it's only used once when opening the symptom journal
80+ *
8181 * @return the authentication token
8282 */
8383 public String getSymptomJournalAuthToken () {
84- try {
85- return authTokenCache .get (SYMPTOM_JOURNAL_KEY , this ::getSymptomJournalAuthTokenInternal );
86- } catch (ExecutionException e ) {
87- logger .error (e .getMessage ());
88- return null ;
89- }
84+ return getSymptomJournalAuthTokenInternal ();
9085 }
9186
9287 private String getSymptomJournalAuthTokenInternal () {
You can’t perform that action at this time.
0 commit comments