Commit Graph

41 Commits

Author SHA1 Message Date
Moses Palmér
43760ec29f Prefer tokenName as vendor extension 2016-12-29 10:06:39 +01:00
Moses Palmér
7ca8cdeffb Read token name using function in auth view 2016-12-29 10:06:39 +01:00
Moses Palmér
fd3eb4f65a Read token name using function 2016-12-29 10:06:39 +01:00
김 재석
bc494dac56 fix authorization code grant to work 2016-11-22 11:56:45 +09:00
Tony Tam
81e897a07a checks for window 2016-11-14 11:34:50 -08:00
Sven Luzar
ce9afa3622 Fix: redirect_uri is required in oauth2 code flow, but was null 2016-07-01 16:57:32 +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
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
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
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
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
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
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
Josh Ponelat
ec86ee2df9 uncomment swagger-oauth and add script 2015-04-29 12:41:08 +02:00
vprefournier
6761fd7a98 Fix - Swagger/Swashbuckle OAuth2 Authorizations not set #1134 2015-04-11 06:27:01 -04:00
Mohsen Azimi
ede1faa0c8 Add ability to override redirectUrl in swagger-oauth
Fixes #457
2015-03-24 13:33:18 -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
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
28e493c101 Oauth 2.0: use space as delimiter for scopes. 2015-02-27 05:15:33 +02:00
Thijs Van der Schaeghe
9c6582455e Adding (ignored) oauth2 state parameter. 2015-02-14 14:34:39 +01:00
Stefano Travelli
b975d4fee8 Include redirect_uri in access token request for OAuth2 authentication. 2015-02-10 14:43:51 +01:00
Tony Tam
038443fc22 merged from develop_2.0 2015-02-01 02:27:43 -08:00
Tony Tam
329772af4c merged from auth_2.0 branch 2014-11-11 00:16:13 -08:00
Antek Drzewiecki
2b08c0e209 Fixed oauth redirect url path. URL works with nested pathnames. 2014-08-14 17:01:18 +02:00
Tony Tam
c3904c54c8 updated key name 2014-08-01 17:11:59 -07:00
Jörg Adler
52db742a10 The list of scopes now RFC6749 Sec.3.3 compliant
See http://tools.ietf.org/html/rfc6749#section-3.3 for details.

The callback url is now determined correctly if the swagger index.html file and
therefore the o2c.html is not in root directory of the host.

Also the popup opens more than one authorization-request-tab in firefox
(seems to append the on-click js method instead of replacing it)
2014-04-03 12:31:02 +02:00
Tony Tam
96c14e43a9 updated oauth2 support into a single config 2014-03-20 15:38:30 -07:00
Tony Tam
da63a33845 merged from oauth2 branch 2014-03-19 21:50:31 -07:00