diff --git a/dist/lib/swagger-oauth.js b/dist/lib/swagger-oauth.js index c4e144fa..4cfefe65 100644 --- a/dist/lib/swagger-oauth.js +++ b/dist/lib/swagger-oauth.js @@ -140,6 +140,9 @@ function handleLogin() { scopes.push(scope); } + // Implicit auth recommends a state parameter. + var state = Math.random (); + window.enabledScopes=scopes; redirect_uri = redirectUrl; @@ -148,6 +151,7 @@ function handleLogin() { url += '&realm=' + encodeURIComponent(realm); url += '&client_id=' + encodeURIComponent(clientId); url += '&scope=' + encodeURIComponent(scopes); + url += '&state=' + encodeURIComponent(state); window.open(url); }); diff --git a/dist/swagger-ui.js b/dist/swagger-ui.js index 3e5fa7a6..ba20d20c 100644 --- a/dist/swagger-ui.js +++ b/dist/swagger-ui.js @@ -401,59 +401,6 @@ Handlebars.registerHelper('sanitize', function(html) { this["Handlebars"]["templates"]["basic_auth_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { return "
\n