mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
remove password from login success event
This commit is contained in:
@@ -501,7 +501,7 @@ describe('LoginComponent', () => {
|
||||
loginWithCredentials('fake-username-ECM-access-error', 'fake-password');
|
||||
}));
|
||||
|
||||
it('should emit success event after the login has succeeded', async(() => {
|
||||
it('should emit success event after the login has succeeded and discard password', async(() => {
|
||||
component.providers = 'ECM';
|
||||
|
||||
component.success.subscribe((event) => {
|
||||
@@ -509,7 +509,7 @@ describe('LoginComponent', () => {
|
||||
|
||||
expect(component.isError).toBe(false);
|
||||
expect(event).toEqual(
|
||||
new LoginSuccessEvent({type: 'type', ticket: 'ticket'}, 'fake-username', 'fake-password')
|
||||
new LoginSuccessEvent({type: 'type', ticket: 'ticket'}, 'fake-username', null)
|
||||
);
|
||||
});
|
||||
|
||||
|
@@ -217,7 +217,8 @@ export class LoginComponent implements OnInit {
|
||||
|
||||
this.actualLoginStep = LoginSteps.Welcome;
|
||||
this.userPreferences.setStoragePrefix(values.username);
|
||||
this.success.emit(new LoginSuccessEvent(token, values.username, values.password));
|
||||
values.password = '';
|
||||
this.success.emit(new LoginSuccessEvent(token, values.username));
|
||||
|
||||
if (redirectUrl) {
|
||||
this.authService.setRedirectUrl(null);
|
||||
|
Reference in New Issue
Block a user