summaryrefslogtreecommitdiffstats
path: root/cadi/servlet-sample/src/test
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-09-28 14:31:39 -0500
committerInstrumental <jonathan.gathman@att.com>2018-09-28 14:32:33 -0500
commite42ec75a7229ceecff749fd36bdc2b5f86357749 (patch)
treef98f8b143450ef47650abf064b1acb6faf2496b9 /cadi/servlet-sample/src/test
parentd17e22ec33eadf58fdb3b491a997bc98550e1ddb (diff)
Fix Version Mismatch
This showed up in Password Management calling Service Issue-ID: AAF-523 Change-Id: Ib8c4205b82ec9e9984d63c469319fa69b8505e9e Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'cadi/servlet-sample/src/test')
-rw-r--r--cadi/servlet-sample/src/test/java/org/onap/aaf/sample/cadi/MyServlet.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/cadi/servlet-sample/src/test/java/org/onap/aaf/sample/cadi/MyServlet.java b/cadi/servlet-sample/src/test/java/org/onap/aaf/sample/cadi/MyServlet.java
index e3342914..7d1eae96 100644
--- a/cadi/servlet-sample/src/test/java/org/onap/aaf/sample/cadi/MyServlet.java
+++ b/cadi/servlet-sample/src/test/java/org/onap/aaf/sample/cadi/MyServlet.java
@@ -33,6 +33,7 @@ import javax.servlet.http.HttpServletRequest;
import org.onap.aaf.cadi.aaf.v2_0.AAFCon;
import org.onap.aaf.cadi.client.Future;
+import org.onap.aaf.cadi.config.Config;
import org.onap.aaf.cadi.principal.TaggedPrincipal;
// Uncomment if you utilized the "MiniJASPIWrap" in the Servlet setup in "main()", and want to protect your service via Permission or mapped role
@@ -99,8 +100,8 @@ import org.onap.aaf.cadi.principal.TaggedPrincipal;
};
}
// This call will be "as the user calling", but only if permission is set to trust.
-// Future<String> future = aafcon.clientAs("2.0",tp).read("/authz/perms/user/"+request.getUserPrincipal().getName(),"application/Perms+json");
- Future<String> future = aafcon.client("2.0").read("/authz/perms/user/"+request.getUserPrincipal().getName(),"application/Perms+json");
+// Future<String> future = aafcon.clientAs(Config.AAF_DEFAULT_VERSION,tp).read("/authz/perms/user/"+request.getUserPrincipal().getName(),"application/Perms+json");
+ Future<String> future = aafcon.client(Config.AAF_DEFAULT_VERSION).read("/authz/perms/user/"+request.getUserPrincipal().getName(),"application/Perms+json");
if (future.get(4000 /* timeout */)) {
res.getOutputStream().print(future.value);
} else {