check clientid
This commit is contained in:
+18
-16
@@ -806,34 +806,36 @@ public class HttpClient5AdapterServiceRest extends HttpClient5AdapterServiceSupp
|
|||||||
//weblogic 에서는 tempProp.get 이 property로 return 해어 아래처럼 수정함. ClassCastException 발생함.
|
//weblogic 에서는 tempProp.get 이 property로 return 해어 아래처럼 수정함. ClassCastException 발생함.
|
||||||
//Properties inboundHeaders = (Properties) tempProp.get(HttpAdapterServiceKey.INBOUND_HEADER);
|
//Properties inboundHeaders = (Properties) tempProp.get(HttpAdapterServiceKey.INBOUND_HEADER);
|
||||||
Properties inboundHeaders = null;
|
Properties inboundHeaders = null;
|
||||||
|
String authorization = "";
|
||||||
try {
|
try {
|
||||||
Object headerObj = tempProp.get(HttpAdapterServiceKey.INBOUND_HEADER);
|
Object headerObj = tempProp.get(HttpAdapterServiceKey.INBOUND_HEADER);
|
||||||
System.out.println("*** inboundheader Ojb:"+headerObj);
|
System.out.println("*** inboundheader Ojb:"+headerObj);
|
||||||
if (headerObj instanceof Properties) { //tomcat
|
if (headerObj instanceof Properties) { //tomcat
|
||||||
inboundHeaders = (Properties) headerObj;
|
inboundHeaders = (Properties) headerObj;
|
||||||
System.out.println("*** inboundHeaders tomcat:"+inboundHeaders);
|
System.out.println("*** inboundHeaders tomcat:"+inboundHeaders);
|
||||||
|
for (String k : inboundHeaders.stringPropertyNames()) {
|
||||||
|
System.out.println("*** inboundheader k is:"+k);
|
||||||
|
if (k.equalsIgnoreCase("authorization")) {
|
||||||
|
authorization = inboundHeaders.getProperty(k);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if (headerObj instanceof String) { //weblogic
|
} else if (headerObj instanceof String) { //weblogic
|
||||||
inboundHeaders = new Properties();
|
String json = (String) headerObj;
|
||||||
inboundHeaders.load(new StringReader((String) headerObj));
|
JSONParser parser = new JSONParser();
|
||||||
System.out.println("*** inboundHeaders weblogic:"+inboundHeaders);
|
JSONObject obj = (JSONObject) parser.parse(json);
|
||||||
|
for (Object k : obj.keySet()) {
|
||||||
|
if (((String) k).equalsIgnoreCase("authorization")) {
|
||||||
|
authorization = (String) obj.get(k);
|
||||||
|
System.out.println("*** inboundHeaders authorization weblogic:"+authorization);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
//* jwhong
|
|
||||||
String key ="authorization";
|
|
||||||
String authorization = null;
|
|
||||||
|
|
||||||
for (String k : inboundHeaders.stringPropertyNames()) {
|
|
||||||
System.out.println("*** inboundheader k is:"+k);
|
|
||||||
if (k.equalsIgnoreCase(key)) {
|
|
||||||
authorization = inboundHeaders.getProperty(k);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// String authorization = inboundHeaders.getProperty("authorization");
|
|
||||||
String jwtToken = "";
|
String jwtToken = "";
|
||||||
|
|
||||||
if (authorization != null && authorization.startsWith("Bearer ")) {
|
if (authorization != null && authorization.startsWith("Bearer ")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user