From 9d778b0fe018ae703cae7db25d24d205c2f7e18e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Mon, 11 Sep 2017 22:21:44 +0200 Subject: [PATCH] enable authentication schemes and improve usability --- README.md | 9 ++---- index.html | 4 +-- soapui.css | 4 +++ soapui.js | 92 ++++++++++++++++++++++++++++++++++++++++++++++-------- 4 files changed, 87 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 22c6c5b..725f369 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ _To do this, you have to pass the `foo` field with bla bla bla. Try it by yourse ``` -_To do this, you have to pass the `bar` field with bla bla bla. Try it by yourself:_ +_To do that, you have to pass the `bar` field with bla bla bla. Try it by yourself:_ ```xml ABCDEF @@ -112,14 +112,11 @@ In the content, make sure to have at the top of your page: ``` diff --git a/index.html b/index.html index 596018b..3fd4f71 100644 --- a/index.html +++ b/index.html @@ -10,13 +10,11 @@ diff --git a/soapui.css b/soapui.css index 2de4594..7d997ba 100644 --- a/soapui.css +++ b/soapui.css @@ -19,6 +19,10 @@ display: block; } +.soapui select { + margin-right: 10px; +} + .soapui .hidden { display: none; } diff --git a/soapui.js b/soapui.js index 87a7ad3..c551367 100644 --- a/soapui.js +++ b/soapui.js @@ -44,7 +44,41 @@ console.error('no jQuery found!') } })(function($) { - function soapui(root_node, soap_options) { + function threescale_authentication(select_node, soap_options) { + $.ajax("/api_docs/account_data.json", { + statusCode: { + 200: function (data, textStatus, xhr) { + var user_keys = data.results.user_keys; + for (var i = 0; i < user_keys.length; i++) { + var name = user_keys[i].name; + var value = user_keys[i].value; + select_node.append($("