aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/swagger-ui/o2c.html
diff options
context:
space:
mode:
authorJakob Odersky <jakob@driver.xyz>2018-01-22 14:28:13 -0800
committerJakob Odersky <jakob@driver.xyz>2018-01-22 15:01:01 -0800
commitb9a1319214e8efdfe2af737236e7ce6d45f08fc2 (patch)
tree206e055f14291e09a65f794b675d82a67eb5fee5 /src/main/resources/swagger-ui/o2c.html
parent199446c2f878992be2a21a00a9263b6330738151 (diff)
downloaddriver-core-b9a1319214e8efdfe2af737236e7ce6d45f08fc2.tar.gz
driver-core-b9a1319214e8efdfe2af737236e7ce6d45f08fc2.tar.bz2
driver-core-b9a1319214e8efdfe2af737236e7ce6d45f08fc2.zip
Include swagger UI in core
These changes centralize the location of the swagger UI web files. The git attributes instruct GitHub to treat the web files as vendored code, as to not be included in the project code statistics. See https://github.com/github/linguist for a more detailed explanation.
Diffstat (limited to 'src/main/resources/swagger-ui/o2c.html')
-rw-r--r--src/main/resources/swagger-ui/o2c.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/resources/swagger-ui/o2c.html b/src/main/resources/swagger-ui/o2c.html
new file mode 100644
index 0000000..88e8bf1
--- /dev/null
+++ b/src/main/resources/swagger-ui/o2c.html
@@ -0,0 +1,20 @@
+<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> \ No newline at end of file