diff --git a/dist/lib/swagger-oauth.js b/dist/lib/swagger-oauth.js
index 9ce424277f7..576fcd33bf9 100644
--- a/dist/lib/swagger-oauth.js
+++ b/dist/lib/swagger-oauth.js
@@ -3,7 +3,6 @@ var popupMask;
var popupDialog;
var clientId;
var realm;
-var oauth2KeyName;
var redirect_uri;
var clientSecret;
var scopeSeparator;
@@ -19,7 +18,6 @@ function handleLogin() {
for(key in defs) {
var auth = defs[key];
if(auth.type === 'oauth2' && auth.scopes) {
- oauth2KeyName = key;
var scope;
if(Array.isArray(auth.scopes)) {
// 1.2 support
@@ -31,7 +29,7 @@ function handleLogin() {
else {
// 2.0 support
for(scope in auth.scopes) {
- scopes.push({scope: scope, description: auth.scopes[scope]});
+ scopes.push({scope: scope, description: auth.scopes[scope], OAuthSchemeKey: key});
}
}
}
@@ -61,12 +59,16 @@ function handleLogin() {
''].join(''));
$(document.body).append(popupDialog);
+ //TODO: only display applicable scopes (will need to pass them into handleLogin)
popup = popupDialog.find('ul.api-popup-scopes').empty();
for (i = 0; i < scopes.length; i ++) {
scope = scopes[i];
- str = '
' + '