From a3b442a09aa3666662003d7c8a5ed69ee24a373e Mon Sep 17 00:00:00 2001 From: Instrumental Date: Fri, 20 Dec 2019 15:55:27 -0600 Subject: Make Organization isRevoked return Date Issue-ID: AAF-1058 Change-Id: I4120235dc6f78fb1db0c7bea86c6938aae076b63 Signed-off-by: Instrumental --- auth/auth-deforg/src/main/java/org/onap/aaf/org/DefaultOrg.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'auth/auth-deforg') diff --git a/auth/auth-deforg/src/main/java/org/onap/aaf/org/DefaultOrg.java b/auth/auth-deforg/src/main/java/org/onap/aaf/org/DefaultOrg.java index 2440e02e..307c9c95 100644 --- a/auth/auth-deforg/src/main/java/org/onap/aaf/org/DefaultOrg.java +++ b/auth/auth-deforg/src/main/java/org/onap/aaf/org/DefaultOrg.java @@ -41,6 +41,7 @@ import org.onap.aaf.auth.org.OrganizationException; import org.onap.aaf.cadi.config.Config; import org.onap.aaf.cadi.util.FQI; import org.onap.aaf.misc.env.Env; +import org.onap.aaf.org.Identities.Data; public class DefaultOrg implements Organization { private static final String AAF_DATA_DIR = "aaf_data_dir"; @@ -172,7 +173,7 @@ public class DefaultOrg implements Organization { * If the ID isn't in the revoked file, if it exists, it is revoked. */ @Override - public boolean isRevoked(AuthzTrans trans, String key) { + public Date isRevoked(AuthzTrans trans, String key) { if(revoked!=null) { try { revoked.open(trans, DefaultOrgIdentity.TIMEOUT); @@ -185,7 +186,8 @@ public class DefaultOrg implements Organization { } else { search = key; } - return revoked.find(search, r)!=null; + Data revokedData = revoked.find(search, r); + return revokedData==null?null:new Date(); } finally { revoked.close(trans); } @@ -193,7 +195,7 @@ public class DefaultOrg implements Organization { trans.error().log(e); } } - return false; + return null; } /* (non-Javadoc) -- cgit 1.2.3-korg