Commit Graph
190 Commits
Author SHA1 Message Date
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: https://github.com/nodeapps/http-server/commit/30f4d1e008b3d707a764eb06ad4c1ac2becd9e96
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
Tony Tam 9d0c6c50e7 updated from master 2015-02-27 09:37:25 -08:00
Stefano Travelli bb1ebcef28 Fix OAuth2 login when no scope is defined 2015-02-27 09:36:29 -08:00
Thijs Van der Schaeghe 9c6582455e Adding (ignored) oauth2 state parameter. 2015-02-14 14:34:39 +01:00
Tony Tam 7ff221485b updated client lib 2015-02-12 11:27:18 -08:00
Tony Tam f6be07ff9a Merge pull request #925 from swagger-api/feature/legacy-cleanup
Feature/legacy cleanup
2015-02-11 21:39:59 -08:00
Tony Tam fd9fbd61e7 updated versions 2015-02-11 21:35:52 -08:00
Tony Tam 9ce5187312 updated files 2015-02-10 12:49:36 -08:00
Stefano Travelli b975d4fee8 Include redirect_uri in access token request for OAuth2 authentication. 2015-02-10 14:43:51 +01:00
Tony Tam 61a87b8fd7 updated client, version 2015-02-09 10:22:44 -08:00