openhab-core/bundles/org.openhab.io.rest.docs/swagger/o2c.html
Kai Kreuzer a5b86617a6 initial commit of openhab core components
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2015-12-26 23:22:23 +01:00

20 lines
449 B
HTML

<script>
var qp = null;
if(window.location.hash) {
qp = location.hash.substring(1);
}
else {
qp = location.search.substring(1);
}
qp = qp ? JSON.parse('{"' + qp.replace(/&/g, '","').replace(/=/g,'":"') + '"}',
function(key, value) {
return key===""?value:decodeURIComponent(value) }
):{}
if (window.opener.swaggerUi.tokenUrl)
window.opener.processOAuthCode(qp);
else
window.opener.onOAuthComplete(qp);
window.close();
</script>