Rework of the designer UI (part4)
[clamp.git] / src / main / resources / META-INF / resources / icd / o2c.html
1 <script>\r
2 var qp = null;\r
3 if(window.location.hash) {\r
4   qp = location.hash.substring(1);\r
5 }\r
6 else {\r
7   qp = location.search.substring(1);\r
8 }\r
9 qp = qp ? JSON.parse('{"' + qp.replace(/&/g, '","').replace(/=/g,'":"') + '"}',\r
10   function(key, value) {\r
11     return key===""?value:decodeURIComponent(value) }\r
12   ):{}\r
13 \r
14 if (window.opener.swaggerUi.tokenUrl)\r
15     window.opener.processOAuthCode(qp);\r
16 else\r
17     window.opener.onOAuthComplete(qp);\r
18 \r
19 window.close();\r
20 </script>