Commit Graph

1276 Commits

Author SHA1 Message Date
Tom Demeranville
bfc33ec6cd Added support for client credentials (application) flow
Added support for multiple authentication schemes

To use the client credentials, index.html needs to have
1. input boxes to receive client id and client secret
2. handlers that intitialise OAuth correctly on change.

For example, you could replace the explore and apikey inputs in the header with:

      <div class='input'><input placeholder="client id" id="input_clientId" name="clientId" type="text" autocomplete="off"/></div>
      <div class='input'><input placeholder="client secret" id="input_clientSecret" name="clientSecret" type="text" autocomplete="off"/></div>

and add the following javascript to handle updates within the initialisation block (replacing the apikey javascript):

      function updateOauth(){
          initOAuth({
              clientId: $('#input_clientId')[0].value,
              clientSecret: $('#input_clientSecret')[0].value,
              realm: "blank",
              appName: "blank"
          });
      }

      $('#input_clientId').change(updateOauth);
      $('#input_clientSecret').change(updateOauth);

These examples could be incorporated into the swagger index.html file if required (or a new example created)

Issues - displaying multiple schemes could be improved.  Currently the UI is unaware that a particular scheme is required for a call so displays all scopes as options.  Will require work on core swagger ui and templates to make scheme available to swagger-oauth.js
2015-12-18 16:11:25 +00:00
Tom Demeranville
b745779e15 Added support for OAuth client credentials (application) flow
Added support for multiple authentication schemes

To use the client credentials, index.html needs to have
1. input boxes to recieve client id and client secret
2. handlers that intitialse OAuth correctly on change.

For example, you could replace the explore and apikey inputs in the header with:

      <div class='input'><input placeholder="client id" id="input_clientId" name="clientId" type="text" autocomplete="off"/></div>
      <div class='input'><input placeholder="client secret" id="input_clientSecret" name="clientSecret" type="text" autocomplete="off"/></div>

and add the following javascrip to handle updates within the initialisation block (replacing the apikey javascript):

      function updateOauth(){
          initOAuth({
              clientId: $('#input_clientId')[0].value,
              clientSecret: $('#input_clientSecret')[0].value,
              realm: "blank",
              appName: "blank"
          });
      }

      $('#input_clientId').change(updateOauth);
      $('#input_clientSecret').change(updateOauth);
2015-12-18 15:58:19 +00:00
Tony Tam
8e420faa23 Merge pull request #1823 from brlo/patch-1
check 'defaultValue' before calling 'replace'
2015-12-17 14:04:51 -05:00
Rodion
63951d0bf8 check 'defaultValue' before calling 'replace'
fix error "defaultValue.replace is not a function" when defaultValue is Integer
2015-12-17 20:14:09 +03:00
Tony Tam
85b0f4bab0 added jsonEditor option 2015-12-16 03:01:35 -08:00
Tony Tam
dbf00bba5b Merge branch 'thomsonreuters-JSONEditorMaster' 2015-12-16 02:47:06 -08:00
Tony Tam
60848bb4e2 rebuilt, set editor to false by default 2015-12-16 02:46:47 -08:00
Laurent Lepinay
2c431d7873 Merge remote-tracking branch 'upstream/master' into JSONEditorMaster
Conflicts:
	dist/swagger-ui.js
	dist/swagger-ui.min.js
	src/main/javascript/view/OperationView.js
	src/main/less/screen.less
2015-12-16 10:25:38 +01:00
Tony Tam
63f6edeef0 Merge branch 'issue-1807' 2015-12-11 11:17:24 -08:00
Tony Tam
2e28c4c2de merged from master 2015-12-11 11:16:55 -08:00
Tony Tam
ea13a647ce updated swagger-client, rebuilt 2015-12-10 12:13:14 -08:00
Tony Tam
d3bb5283b4 added fonts to binary 2015-12-09 20:38:24 -08:00
Tony Tam
b9236ba3f9 updated font files 2015-12-09 20:37:19 -08:00
Tony Tam
c578a530af formatting 2015-12-09 20:35:44 -08:00
Tony Tam
daf150de34 fixes #1807 2015-12-09 20:14:41 -08:00
Tony Tam
d39992f7cf rebuilt 2015-12-09 15:16:51 -08:00
Tony Tam
0db417eaa3 Merge pull request #1563 from triccardi-systran/patch-http-server-version-dependency
Go back to released http-server versions dependency now that they released CORS support in 0.8.0
2015-12-09 15:16:10 -08:00
Tony Tam
1945404efe Merge pull request #1530 from yyamano/fix-xss
Fix a XSS issue.
2015-12-09 15:15:16 -08:00
Tony Tam
1ae098e390 Merge pull request #1521 from yyamano/fix-missing-data-sw-translate
Add missing data-sw-translate attributes.
2015-12-09 15:13:25 -08:00
Tony Tam
5af798c84e Merge pull request #1648 from estiller/master
Support additional query parameters during OAuth2 authorization process
2015-12-09 14:36:38 -08:00
Tony Tam
cb9bb178f7 marked fonts as binary 2015-12-09 13:58:22 -08:00
Tony Tam
aaadb0e69f Merge pull request #1806 from swagger-api/issue-1476
added success response per #1476
2015-12-09 13:57:15 -08:00
Tony Tam
bfa98a88ba removed unused var 2015-12-09 13:52:37 -08:00
Tony Tam
644da49077 added success response per #1476 2015-12-09 13:49:04 -08:00
Tony Tam
8469055881 Merge pull request #1805 from swagger-api/issue-1453
fix for #1453, escaped apostrophe
2015-12-09 12:52:18 -08:00
Tony Tam
8ee29c743a fix for #1453, escaped apostrophe 2015-12-09 12:45:43 -08:00
Tony Tam
97f3af0443 fix for #1068, enabled content-type when read-only mode 2015-12-07 12:40:41 -08:00
Tony Tam
0476b4c9f7 Merge pull request #1801 from spadger/master
Add support for content-types which contain a quote symbol.
2015-12-07 07:13:21 -08:00
Jon Bates
3c52598ec9 Add support for content-types which contain a quote symbol. 2015-12-07 13:45:36 +00:00
Tony Tam
40bd458141 Merge pull request #1791 from DarkSorrow/master
Fix file displayed as undefined
2015-12-01 23:43:08 -08:00
Tony Tam
7025f4ca00 Merge pull request #1770 from seanpkps/master
provide option for controling rendering of model objects
2015-12-01 23:06:30 -08:00
Hassan Allybocus
98d8d3e667 Fix file displayed as undefined
File was not showing properly in the DataType for formData
2015-12-01 09:49:32 +01:00
Sean Kennedy
a5d865d1cd Merge branch 'master' of github.com:seanpkps/swagger-ui 2015-11-30 08:39:18 -05:00
Sean Kennedy
745c8d1c81 rebase, no version bump, updated dist builds 2015-11-30 08:36:29 -05:00
Sean Kennedy
d2d057c0c0 distribution of new defaultModelRendering option 2015-11-30 08:27:58 -05:00
Sean Kennedy
b31f7fded9 increase package version 2015-11-30 08:26:30 -05:00
Sean Kennedy
1ccab589f8 implement option to control whether models are displayed as valid JSON schema or the docs rendering (with descriptions) by default 2015-11-30 08:26:30 -05:00
Sean Kennedy
1dc7894365 consistent handling of dev tasks so that clean and copy actions don't bother each other 2015-11-30 08:26:30 -05:00
Sean Kennedy
43fc67b21e gitignore local specs copied to dist & anything in test/specs/local 2015-11-30 08:26:30 -05:00
Sean Kennedy
d7bc9b56d2 add targets to the gulpfile to simplify testing how various local specs display
(and modifying and looking again at those specs iteratively)

new gulp targets:
dev-dist: [lint, copy] (this runs the same code in dist, but without doing a clean first)
dev: [default, serve] (the task to run if you're iteratively making changes and don't want/need the dist directory to be regenerated every time)
2015-11-30 08:26:30 -05:00
Tony Tam
04e1fb5cef Merge branch 'verpixelt-_refactor/less' 2015-11-27 18:21:18 -08:00
Tony Tam
20c2454438 rebuilt after merge with master 2015-11-27 18:21:04 -08:00
Tony Tam
a7c3ffc0f8 Merge branch '_refactor/less' of https://github.com/verpixelt/swagger-ui into verpixelt-_refactor/less 2015-11-27 18:19:08 -08:00
Tony Tam
e3062b771f Merge branch 'issue-1767' 2015-11-27 18:09:53 -08:00
Tony Tam
3cb9f1f797 merged 2015-11-27 18:09:41 -08:00
Tony Tam
c482d1c800 merged with master 2015-11-27 18:04:28 -08:00
Tony Tam
7c87a4000a rebuilt 2015-11-27 18:02:27 -08:00
Tony Tam
8da0078791 updated swagger-js version 2015-11-27 17:59:13 -08:00
Tony Tam
8276fbf073 fixes #1767 2015-11-27 17:28:46 -08:00
Tony Tam
553e5679eb Merge pull request #1774 from prantlf/fix-fields-basic-auth
Fix reading values of username and password from the basic authwntication form
2015-11-22 08:33:45 -10:00