only pass selected scopes

This commit is contained in:
Tony Tam
2016-11-23 20:54:54 -08:00
parent 9e5c4b2efe
commit d963302c72
3 changed files with 9 additions and 5 deletions

4
dist/swagger-ui.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -98,7 +98,9 @@ SwaggerUi.Views.AuthView = Backbone.View.extend({
var redirectUrl = window.oAuthRedirectUrl || defaultRedirectUrl;
var url = null;
var scopes = _.map(auth.get('scopes'), function (scope) {
if(scope.checked) {
return scope.scope;
}
});
var container = window.swaggerUiAuth || (window.swaggerUiAuth = {});
var state, dets, ep;