swagger-ui.swagger_bak.patch.js Maven / Gradle / Ivy
$("#input_apiKey").parent().replaceWith(
"" +
"");
$('#txtUsername').change(addBasicAuth);
$('#txtPassword').change(addBasicAuth);
function addBasicAuth() {
var username = $('#txtUsername').val().replace(/^\s+|\s+$/gm, ''); //trim
var password = $('#txtPassword').val().replace(/^\s+|\s+$/gm, '');
if (username && password) {
window.authorizations.add("basic", new PasswordAuthorization("basic", username, password));
}
}