Merge pull request #1774 from prantlf/fix-fields-basic-auth
Fix reading values of username and password from the basic authwntication form
This commit is contained in:
7
dist/swagger-ui.js
vendored
7
dist/swagger-ui.js
vendored
@@ -31057,9 +31057,10 @@ SwaggerUi.Views.BasicAuthButton = Backbone.View.extend({
|
|||||||
'click #apply_basic_auth' : 'applyPassword'
|
'click #apply_basic_auth' : 'applyPassword'
|
||||||
},
|
},
|
||||||
|
|
||||||
applyPassword: function(){
|
applyPassword: function(event){
|
||||||
var username = $('.input_username').val();
|
event.preventDefault();
|
||||||
var password = $('.input_password').val();
|
var username = $('#input_username').val();
|
||||||
|
var password = $('#input_password').val();
|
||||||
var basicAuth = new SwaggerClient.PasswordAuthorization('basic', username, password);
|
var basicAuth = new SwaggerClient.PasswordAuthorization('basic', username, password);
|
||||||
this.router.api.clientAuthorizations.add(this.model.type, basicAuth);
|
this.router.api.clientAuthorizations.add(this.model.type, basicAuth);
|
||||||
this.router.load();
|
this.router.load();
|
||||||
|
|||||||
4
dist/swagger-ui.min.js
vendored
4
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -20,9 +20,10 @@ SwaggerUi.Views.BasicAuthButton = Backbone.View.extend({
|
|||||||
'click #apply_basic_auth' : 'applyPassword'
|
'click #apply_basic_auth' : 'applyPassword'
|
||||||
},
|
},
|
||||||
|
|
||||||
applyPassword: function(){
|
applyPassword: function(event){
|
||||||
var username = $('.input_username').val();
|
event.preventDefault();
|
||||||
var password = $('.input_password').val();
|
var username = $('#input_username').val();
|
||||||
|
var password = $('#input_password').val();
|
||||||
var basicAuth = new SwaggerClient.PasswordAuthorization('basic', username, password);
|
var basicAuth = new SwaggerClient.PasswordAuthorization('basic', username, password);
|
||||||
this.router.api.clientAuthorizations.add(this.model.type, basicAuth);
|
this.router.api.clientAuthorizations.add(this.model.type, basicAuth);
|
||||||
this.router.load();
|
this.router.load();
|
||||||
|
|||||||
Reference in New Issue
Block a user