public void LoginAs(string email) { var login = LoginResourceAlter.Value.Create(cr => cr.Email = email).Value; token = login.Token; UserResource = login.User; OnTokenChange?.Invoke(this, token); }
public void LoginAsAdmin() { isLoggin = true; var login = LoginResourceAlter.Value.Create(new LoginAlterResource() { Email = Config.AdminUser, Password = Config.AdminPassword }).Value; token = login.Token; UserResource = login.User; OnTokenChange?.Invoke(this, token); isLoggin = false; }
public void Logout() { token = null; UserResource = null; OnTokenChange?.Invoke(this, token); }