From 4808b59880b05542c5fe68a6484dec02d3d57ef2 Mon Sep 17 00:00:00 2001 From: Brian Freeman Date: Wed, 16 May 2018 10:29:12 -0500 Subject: Add guard time to keystone expiry Issue-ID: SO-622 Change-Id: If8260ee70d3c632325939affcbd80258b2602c99 Signed-off-by: Brian Freeman --- .../main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'adapters/mso-adapter-utils/src/main/java/org') diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java index 6bec917d9d..1f3c43c79e 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java @@ -571,7 +571,8 @@ public class MsoKeystoneUtils extends MsoTenantUtils { } public boolean isExpired () { - return expires == null || System.currentTimeMillis() > expires.getTimeInMillis(); + // adding arbitrary guard timer of 5 minutes + return expires == null || System.currentTimeMillis() > (expires.getTimeInMillis() - 300000); } } -- cgit 1.2.3-korg