Add support for encrypted client tokens via basic auth (for the docker CLI) and a feature flag to disable normal passwords
This commit is contained in:
parent
a7a8571396
commit
e4b659f107
10 changed files with 222 additions and 8 deletions
|
@ -92,5 +92,47 @@ angular.module('quay').factory('UIService', [function() {
|
|||
return new CheckStateController(items, opt_checked);
|
||||
};
|
||||
|
||||
uiService.showPasswordDialog = function(message, callback, opt_canceledCallback) {
|
||||
var success = function() {
|
||||
var password = $('#passDialogBox').val();
|
||||
$('#passDialogBox').val('');
|
||||
callback(password);
|
||||
};
|
||||
|
||||
var canceled = function() {
|
||||
$('#passDialogBox').val('');
|
||||
opt_canceledCallback && opt_canceledCallback();
|
||||
};
|
||||
|
||||
var box = bootbox.dialog({
|
||||
"message": message +
|
||||
'<form style="margin-top: 10px" action="javascript:void(0)">' +
|
||||
'<input id="passDialogBox" class="form-control" type="password" placeholder="Current Password">' +
|
||||
'</form>',
|
||||
"title": 'Please Verify',
|
||||
"buttons": {
|
||||
"verify": {
|
||||
"label": "Verify",
|
||||
"className": "btn-success",
|
||||
"callback": success
|
||||
},
|
||||
"close": {
|
||||
"label": "Cancel",
|
||||
"className": "btn-default",
|
||||
"callback": canceled
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
box.bind('shown.bs.modal', function(){
|
||||
box.find("input").focus();
|
||||
box.find("form").submit(function() {
|
||||
if (!$('#passDialogBox').val()) { return; }
|
||||
box.modal('hide');
|
||||
success();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
return uiService;
|
||||
}]);
|
||||
|
|
Reference in a new issue