aboutsummaryrefslogtreecommitdiffstats
path: root/admportal/lib/CSPCheck.java
blob: dac1d886ae78798c1d829a3e7a443640627120f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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\"}");
	}
}
}