summaryrefslogtreecommitdiffstats
path: root/auth/auth-hello
diff options
context:
space:
mode:
Diffstat (limited to 'auth/auth-hello')
-rw-r--r--auth/auth-hello/pom.xml7
-rw-r--r--auth/auth-hello/src/main/java/org/onap/aaf/auth/hello/API_Hello.java10
2 files changed, 5 insertions, 12 deletions
diff --git a/auth/auth-hello/pom.xml b/auth/auth-hello/pom.xml
index f9a420f9..676ca3ea 100644
--- a/auth/auth-hello/pom.xml
+++ b/auth/auth-hello/pom.xml
@@ -54,12 +54,7 @@
<dependency>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>aaf-cadi-aaf</artifactId>
- </dependency>
- <dependency>
- <groupId>org.owasp.encoder</groupId>
- <artifactId>encoder</artifactId>
- <version>1.2.1</version>
- </dependency>
+ </dependency>
</dependencies>
diff --git a/auth/auth-hello/src/main/java/org/onap/aaf/auth/hello/API_Hello.java b/auth/auth-hello/src/main/java/org/onap/aaf/auth/hello/API_Hello.java
index cdaa6a76..4ffb1787 100644
--- a/auth/auth-hello/src/main/java/org/onap/aaf/auth/hello/API_Hello.java
+++ b/auth/auth-hello/src/main/java/org/onap/aaf/auth/hello/API_Hello.java
@@ -35,8 +35,6 @@ import org.onap.aaf.auth.rserv.HttpMethods;
import org.onap.aaf.misc.env.Env;
import org.onap.aaf.misc.env.TimeTaken;
-import org.owasp.encoder.Encode;
-
/**
* API Apis
* @author Jonathan
@@ -72,7 +70,7 @@ public class API_Hello {
String perm = pathParam(req, "perm");
if (perm!=null && perm.length()>0) {
os.print('(');
- os.print(Encode.forJava(req.getUserPrincipal().getName()));
+ os.print(req.getUserPrincipal().getName());
TimeTaken tt = trans.start("Authorize perm", Env.REMOTE);
try {
if (req.isUserInRole(perm)) {
@@ -84,7 +82,7 @@ public class API_Hello {
tt.done();
}
os.print("Permission: ");
- os.print(Encode.forJava(perm));
+ os.print(perm);
os.print(')');
}
os.println();
@@ -146,7 +144,7 @@ public class API_Hello {
}
sb.append("}");
ServletOutputStream os = resp.getOutputStream();
- os.println(Encode.forJava(sb.toString()));
+ os.println(sb.toString());
trans.info().printf("Said 'RESTful Hello' to %s, Authentication type: %s",trans.getUserPrincipal().getName(),trans.getUserPrincipal().getClass().getSimpleName());
}
},APPLICATION_JSON);
@@ -166,7 +164,7 @@ public class API_Hello {
trans.info().printf("Content from %s: %s\n", pathParam(req, ":id"),content);
if (content.startsWith("{") && content.endsWith("}")) {
resp.setStatus(200 /* OK */);
- resp.getOutputStream().print(Encode.forJava(content));
+ resp.getOutputStream().print(content);
} else {
resp.getOutputStream().write(NOT_JSON);
resp.setStatus(406);