Merge pull request #2192 from swagger-api/issue-2075

changed auth name from `basic` to use configured value
This commit is contained in:
Tony Tam
2016-06-04 14:54:00 -07:00
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);
} }