Commit cef36b28 authored by Jochen Kressin's avatar Jochen Kressin
Browse files

reverted PR #3, corrected error messages on login

parent 1c3f2f89
......@@ -22,16 +22,15 @@ import util from 'util';
export default function (Client, config, components) {
const ca = components.clientAction.factory;
const host = config.host;
const url = util.format('%s//%s:%s/_searchguard/authinfo', host.protocol, host.host, host.port);
Client.prototype.searchguard = components.clientAction.namespaceFactory();
Client.prototype.searchguard.prototype.authinfo = ca({
url: {
fmt: url
}
});
const ca = components.clientAction.factory;
Client.prototype.searchguard = components.clientAction.namespaceFactory();
Client.prototype.searchguard.prototype.authinfo = ca({
url: {
fmt: '_searchguard/authinfo'
}
});
Client.prototype.searchguard.prototype.multitenancyinfo = ca({
url: {
......
......@@ -82,7 +82,11 @@ export default function LoginController(kbnUrl, $scope, $http, $window) {
},
(error) => {
this.errorMessage = "Invalid username or password.";
if (error.status && error.status === 401) {
this.errorMessage = 'Invalid username or password, please try again';
} else {
this.errorMessage = 'An error occurred while checking your credentials, make sure your have a running Elasticsearch cluster secured by Search Guard running.';
}
}
);
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment