Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
loginMyUser(username: string, password: string, server: string) {
// Log user in
const salt = this.generateSalt();
const token = new Md5().appendStr(password).appendStr(salt).end().toString();
const myUser: MyUser = {
name: username,
salt: salt,
token: token,
server: server
};
localStorage.setItem(USER_INFO, JSON.stringify(myUser));
localStorage.setItem(SERVER_URL, server);
this.loadMyRoles(username);
this.loadMyFolders(username);
}
constructor(private projectServices: ProjectService,
private store: Store,
private projectsActions: ProjectsActions,
private modalService: ModalService,
private errorService: ErrorService) {
this.md5 = new Md5();
}