summaryrefslogtreecommitdiffstats
path: root/admportal/lib/CSPCheck.java
diff options
context:
space:
mode:
Diffstat (limited to 'admportal/lib/CSPCheck.java')
-rw-r--r--admportal/lib/CSPCheck.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/admportal/lib/CSPCheck.java b/admportal/lib/CSPCheck.java
new file mode 100644
index 00000000..dac1d886
--- /dev/null
+++ b/admportal/lib/CSPCheck.java
@@ -0,0 +1,27 @@
+import esGateKeeper.*;
+import java.util.*;
+import java.io.*;
+import java.net.*;
+public class CSPCheck{
+
+public static void main(String[] args){
+ try{
+ String attuid = "";
+ if(args != null && args.length == 2){
+ String secCookie = args[0];
+ //validationEnv can be DEVL or PROD
+ String validationEnv=args[1];
+ String retString = esGateKeeper.esGateKeeper(secCookie, "CSP", validationEnv, -5, "/tmp/");
+ if(retString != null){
+ String[] dataArr = retString.split("\\|");
+ attuid= dataArr[5];
+
+ }
+ System.out.print("{" + "\"attuid\" : \"" + attuid + "\"}");
+ }
+ }catch(Exception e){
+ System.out.print("{" + "\"attuid\" : \"ERROR\"}");
+ }
+}
+}
+