private string serialize_cookie(string login, string password, string companyId, string branchId, string name) { var cookieValue = new CredentialCookie(login, password, companyId, branchId, name); var serializedValue = O7JsonSerealizer.Serialize(cookieValue); var cryptography = new O7Cryptography(Constant.CRYPTO_KEY); return(cryptography.Encrypt(serializedValue)); }
private void authenticate_user(CredentialCookie credential) { var user = make_user(credential); _authentication.SetUser(user); }
private O7User make_user(CredentialCookie cookie) { return(new O7User(cookie.CompanyId, cookie.BranchId, cookie.Login, cookie.Name, cookie.Password)); }