Commit Graph

199 Commits

Author SHA1 Message Date
Josh Ponelat
5a5967e4b3 add object-assign pollyfill, for travis 2016-05-10 18:00:24 +02:00
bodnia
dfd9b10798 [auth] fixed display of scopes in auth button, added highlight of empty field 2016-03-15 17:13:59 +02:00
bodnia
56c5294c22 [auth] Authorize with oauth2 2016-03-13 23:37:10 +02:00
Anna Bodnia
ed7c7261be performance #1956 added highlightSizeThreshold option disable highlight when length more than highlightSizeThreshold 2016-02-22 17:24:34 +02:00
Anna Bodnia
14124c729b Upgraded highlight version to 9.1, removed highlight when sample is too long 2016-02-09 15:16:07 +02:00
Anna Bodnia
bb9de54eb5 sample display render blocked screen 2016-02-02 17:06:15 +02:00
Anna Bodnia
3426cc8c13 #1248 moved model rendering into separate partial 2016-01-05 13:50:30 +02:00
Anna Bodnia
3dd4315bb8 #1248 Added schema render from swagger-js to swagger-ui 2016-01-04 20:23:37 +02:00
Tom Demeranville
04c23c4ee5 added selector back in 2015-12-18 16:24:07 +00:00
Tom Demeranville
3f9b178ce1 fixed display of OAuth scheme in dialog if more than one scheme 2015-12-18 16:21:01 +00:00
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
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
5af798c84e Merge pull request #1648 from estiller/master
Support additional query parameters during OAuth2 authorization process
2015-12-09 14:36:38 -08:00
Laurent Lepinay
57055ffc18 Merge remote-tracking branch 'upstream/master' into JSONEditorMaster
Conflicts:
	dist/swagger-ui.js
	dist/swagger-ui.min.js
2015-10-29 10:48:42 +01:00
Tony Tam
5f22a46672 Merge pull request #1682 from lucian303/oauth-client-secret
Make client secret optional, depending on grant type.
2015-10-26 16:24:31 -07:00
Lucian Hontau
19639aba2b Make client secret optional, depending on grant type. 2015-10-16 13:34:05 -04:00
Eran Stiller
5fa84ff570 Add easy option to specify additional query parameters during the OAuth2 authorization process 2015-10-04 11:37:12 +03:00
Laurent Lepinay
f08e9df8da fix jsoneditor render when nested object type is not defined 2015-09-21 15:11:50 +02:00
unknown
ea2cefa46e Merge branch 'JSONEditor' into JSONEditorMaster
Conflicts:
	dist/swagger-ui.js
	dist/swagger-ui.min.js
	src/main/less/screen.less
2015-09-10 10:53:15 +02:00
Li Lin
00a5e4d838 fix for issue #1516: OAuth logout doesn't work 2015-08-11 16:38:03 +08:00
Tony Tam
83afb5b277 rebuilt 2015-07-22 18:19:27 -07:00
Tony Tam
5195447df6 Merge pull request #1419 from lucian303/oauth-client-secret
Add support for oauth client secret when calling the token URL. Fixes #1384. Fixes #1324.
2015-07-22 18:12:39 -07:00
Tony Tam
34e4a68da8 Merge pull request #1389 from bigtlb/develop_2.0
OAuth flow only selected scopes should be sent to Authorize endpoint #1388.
2015-07-22 18:00:08 -07:00
sonicd300
379609bb70 Added flexible scope separator 2015-07-16 15:18:08 -05:00
Laurent Lepinay
2763800bee labels css 2015-07-10 15:59:41 +02:00
Laurent Lepinay
d968fda207 Merge remote-tracking branch 'swagger/develop_2.0' into JSONEditorMerge
Conflicts:
	dist/index.html
	dist/swagger-ui.js
	dist/swagger-ui.min.js
	src/main/html/index.html
	src/main/template/param.handlebars
	src/main/template/param_required.handlebars
2015-07-07 15:31:21 +02:00
Laurent Lepinay
92efe421d0 fixes 2015-07-07 14:55:04 +02:00
Laurent Lepinay
c51f1ebb9b preparing for non required properties in jsoneditor 2015-07-02 17:59:13 +02:00
Lucian Hontau
1fd15c6b34 Add support for oauth client secret when calling the token URL. Fixes #1384. Fixes #1324. 2015-06-25 17:57:29 -04:00
Tom Baker
340da086ba OAuth flow only selected scopes should be sent to Authorize endpoint #1388.
Need to clear out previous popupDialog nodes, so previous checkboxes won't be considered.
2015-06-19 13:30:20 -05:00
Vladimir L
695dcc16b1 fixed issue with OAuth hint 2015-06-11 21:21:37 +02:00
Shawn Gong
9b8d663a0a removed unused bootstrap.min.js file 2015-06-04 14:14:48 -04:00
Shawn Gong
6cfa818b02 curl hack to showcase curl output in the swagger-ui 2015-05-26 14:39:19 -04:00
Josh Ponelat
ec86ee2df9 uncomment swagger-oauth and add script 2015-04-29 12:41:08 +02:00
Laurent Lepinay
f3ee0a436c Merge remote-tracking branch 'upstream/develop_2.0' into JSONEditor
Conflicts:
	dist/swagger-ui.js
	dist/swagger-ui.min.js
2015-04-20 10:16:54 +02:00
vprefournier
6761fd7a98 Fix - Swagger/Swashbuckle OAuth2 Authorizations not set #1134 2015-04-11 06:27:01 -04:00
laurent lepinay
326f542d04 Merge branch 'develop_2.0' into JSONEditor
Conflicts:
	dist/index.html
	dist/swagger-ui.js
	dist/swagger-ui.min.js
2015-03-27 02:15:29 -07:00
Mohsen Azimi
99eaf4eb23 Use SwaggerJS from npm
* Uses npm to download latest swagger-js (for now. When swagger-js is
   released we will replace git address with actual swagger-ui)

* Uses `postinstall` to generate `browser` folder of swagger-ui. This
 can go when swagger-ui is published.
2015-03-25 12:49:39 -07:00
Mohsen Azimi
ede1faa0c8 Add ability to override redirectUrl in swagger-oauth
Fixes #457
2015-03-24 13:33:18 -07:00
laurent lepinay
e7b7465335 Merge branch 'develop_2.0' into JSONEditor
Conflicts:
	dist/index.html
	dist/swagger-ui.js
	dist/swagger-ui.min.js
	src/main/coffeescript/view/MainView.coffee
	src/main/coffeescript/view/OperationView.coffee
	src/main/coffeescript/view/ParameterView.coffee
	src/main/coffeescript/view/ResourceView.coffee
	src/main/coffeescript/view/SignatureView.coffee
	src/main/html/index.html
2015-03-24 07:06:07 -07:00
Mohsen Azimi
afe232747b Normalize all the line endings 2015-03-17 14:34:22 -07:00
Mohsen Azimi
d61cf24ae0 Append swagger-auth global functions to window and don't break backward 2015-03-16 15:07:14 -07:00
Jeremy Whitlock
bdb181cb08 Update swagger-js with latest
* For the e2e tests to run, we had to enable CORS in http-server.  The
  release of http-server that supports CORS hasn't come out yet so we
  have to use http-server@master until then.  Here is the commit I speak
  of: 30f4d1e008
2015-03-11 14:17:11 -06:00
laurent lepinay
eb390ffca2 JSON Editor feature 2015-03-09 07:06:24 -07:00
Mohsen Azimi
33d5331e60 Merge branch 'master' of https://github.com/CatLabInteractive/swagger-ui into CatLabInteractive-master
Conflicts:
	dist/lib/swagger-oauth.js
	dist/swagger-ui.js
	dist/swagger-ui.min.js
	lib/swagger-oauth.js
2015-03-02 10:15:48 -08:00
Ivan Goncharov
cae9755076 Oauth 2.0: use space as delimiter for scopes. 2015-02-27 09:42:04 -08:00
Tony Tam
779db5da6a reverted files 2015-02-27 09:42:04 -08:00
Tony Tam
8f0d89c54a updated js lib 2015-02-27 09:42:04 -08:00
Mohsen Azimi
7622b38426 Add underscore source map file
Fixes #949
2015-02-27 09:41:37 -08:00