diff options
Diffstat (limited to 'a1-policy-management/src/main')
-rw-r--r-- | a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/SecurityContext.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/SecurityContext.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/SecurityContext.java index 3566aada..fe7c11f0 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/SecurityContext.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/SecurityContext.java @@ -47,7 +47,7 @@ public class SecurityContext { @Setter private Path authTokenFilePath; - public SecurityContext(@Value("${app.auth-token-file:\"\"}") String authTokenFilename) { + public SecurityContext(@Value("${app.auth-token-file:}") String authTokenFilename) { if (!authTokenFilename.isEmpty()) { this.authTokenFilePath = Path.of(authTokenFilename); } @@ -63,7 +63,7 @@ public class SecurityContext { } try { long lastModified = authTokenFilePath.toFile().lastModified(); - if (lastModified != this.tokenTimestamp) { + if (tokenTimestamp == 0 || lastModified != this.tokenTimestamp) { this.authToken = Files.readString(authTokenFilePath); this.tokenTimestamp = lastModified; } |