PLT-2258 Unified login screen and related APIs (#2820)

* Unified login screen and related APIs

* Refactored login API call to be less convoluted

* Removed LDAP login prompt from invite process

* Fixed existing LDAP users being able to log in if LDAP was configured, but disabled

* Gofmt

* Future proofed login API

* Updated login APIs based on feedback

* Added additional auditing to login API

* Actually removed loginById
Этот коммит содержится в:
Harrison Healey
2016-05-03 14:10:36 -04:00
коммит произвёл Christopher Speller
родитель e76a30bca0
Коммит 87989b8afd
36 изменённых файлов: 630 добавлений и 1049 удалений

Просмотреть файл

@@ -39,14 +39,13 @@ class WebClientClass extends Client {
// not sure why but super.login doesn't work if using an () => arrow functions.
// I think this might be a webpack issue.
webLogin(email, username, password, token, success, error) {
webLogin(loginId, password, token, success, error) {
this.login(
email,
username,
loginId,
password,
token,
(data) => {
this.track('api', 'api_users_login_success', '', 'email', data.email);
this.track('api', 'api_users_login_success', '', 'login_id', loginId);
BrowserStore.signalLogin();
if (success) {
@@ -54,7 +53,7 @@ class WebClientClass extends Client {
}
},
(err) => {
this.track('api', 'api_users_login_fail', name, 'email', email);
this.track('api', 'api_users_login_fail', name, 'login_id', loginId);
if (error) {
error(err);
}