summaryrefslogtreecommitdiffstats
path: root/auth
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 /auth
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 'auth')
-rw-r--r--auth/.gitignore1
-rw-r--r--auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_AAFCli.java2
-rw-r--r--auth/auth-service/src/main/java/org/onap/aaf/auth/service/AAF_Service.java9
-rw-r--r--auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_Creds.java3
4 files changed, 8 insertions, 7 deletions
diff --git a/auth/.gitignore b/auth/.gitignore
index 5833316a..943f63bf 100644
--- a/auth/.gitignore
+++ b/auth/.gitignore
@@ -4,3 +4,4 @@
/aaf_*
/deploy.gz
/createLocalDeploy.sh
+/helm
diff --git a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_AAFCli.java b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_AAFCli.java
index 7316a552..0120fa7f 100644
--- a/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_AAFCli.java
+++ b/auth/auth-cmd/src/test/java/org/onap/aaf/auth/cmd/test/JU_AAFCli.java
@@ -193,7 +193,7 @@ public class JU_AAFCli {
Locator loc;
loc = new PropertyLocator(aafUrl);
TIMEOUT = Integer.parseInt(env.getProperty(Config.AAF_CONN_TIMEOUT, Config.AAF_CONN_TIMEOUT_DEF));
- HMangr hman = new HMangr(env, loc).readTimeout(TIMEOUT).apiVersion("2.0");
+ HMangr hman = new HMangr(env, loc).readTimeout(TIMEOUT).apiVersion(Config.AAF_DEFAULT_VERSION);
// TODO: Consider requiring a default in properties
env.setProperty(Config.AAF_DEFAULT_REALM,
diff --git a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/AAF_Service.java b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/AAF_Service.java
index 4a592651..5253513d 100644
--- a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/AAF_Service.java
+++ b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/AAF_Service.java
@@ -209,14 +209,13 @@ public class AAF_Service extends AbsService<AuthzEnv,AuthzTrans> {
*
*/
public void route(HttpMethods meth, String path, API api, Code code) throws Exception {
- String version = "2.0";
Class<?> respCls = facade.mapper().getClass(api);
if (respCls==null) throw new Exception("Unknown class associated with " + api.getClass().getName() + ' ' + api.name());
- String application = applicationJSON(respCls, version);
+ String application = applicationJSON(respCls, Config.AAF_DEFAULT_VERSION);
- route(env,meth,path,code,application,"application/json;version=2.0","*/*");
- application = applicationXML(respCls, version);
- route(env,meth,path,code.clone(facade_XML,false),application,"text/xml;version=2.0");
+ route(env,meth,path,code,application,"application/json;version="+Config.AAF_DEFAULT_VERSION,"*/*");
+ application = applicationXML(respCls, Config.AAF_DEFAULT_VERSION);
+ route(env,meth,path,code.clone(facade_XML,false),application,"text/xml;version=Config.AAF_DEFAULT_VERSION");
}
/**
diff --git a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_Creds.java b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_Creds.java
index a8830c93..964a0522 100644
--- a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_Creds.java
+++ b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_Creds.java
@@ -194,7 +194,8 @@ public class API_Creds {
*/
authzAPI.route(POST,"/authn/cred",API.CRED_REQ,new Code(facade,"Add a New ID/Credential", true) {
@Override
- public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) throws Exception { Result<Void> r = context.createUserCred(trans, req);
+ public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) throws Exception {
+ Result<Void> r = context.createUserCred(trans, req);
if (r.isOK()) {
resp.setStatus(HttpStatus.CREATED_201);
} else {