added fix for #2075, changed auth name from basic to use configured value

This commit is contained in:
Tony Tam
2016-06-04 14:40:56 -07:00
parent 30ed33c446
commit 1a1cfc55ba
3 changed files with 3 additions and 3 deletions

2
dist/swagger-ui.js vendored
View File

@@ -19623,7 +19623,7 @@ SwaggerUi.Views.AuthView = Backbone.View.extend({
this.router.api.clientAuthorizations.add(auth.get('title'), keyAuth); this.router.api.clientAuthorizations.add(auth.get('title'), keyAuth);
} else if (type === 'basic') { } else if (type === 'basic') {
basicAuth = new SwaggerClient.PasswordAuthorization(auth.get('username'), auth.get('password')); basicAuth = new SwaggerClient.PasswordAuthorization(auth.get('username'), auth.get('password'));
this.router.api.clientAuthorizations.add(auth.get('type'), basicAuth); this.router.api.clientAuthorizations.add(auth.get('title'), basicAuth);
} else if (type === 'oauth2') { } else if (type === 'oauth2') {
this.handleOauth2Login(auth); this.handleOauth2Login(auth);
} }

File diff suppressed because one or more lines are too long

View File

@@ -71,7 +71,7 @@ SwaggerUi.Views.AuthView = Backbone.View.extend({
this.router.api.clientAuthorizations.add(auth.get('title'), keyAuth); this.router.api.clientAuthorizations.add(auth.get('title'), keyAuth);
} else if (type === 'basic') { } else if (type === 'basic') {
basicAuth = new SwaggerClient.PasswordAuthorization(auth.get('username'), auth.get('password')); basicAuth = new SwaggerClient.PasswordAuthorization(auth.get('username'), auth.get('password'));
this.router.api.clientAuthorizations.add(auth.get('type'), basicAuth); this.router.api.clientAuthorizations.add(auth.get('title'), basicAuth);
} else if (type === 'oauth2') { } else if (type === 'oauth2') {
this.handleOauth2Login(auth); this.handleOauth2Login(auth);
} }