Пример #1
0
        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));
        }
Пример #2
0
        private void authenticate_user(CredentialCookie credential)
        {
            var user = make_user(credential);

            _authentication.SetUser(user);
        }
Пример #3
0
 private O7User make_user(CredentialCookie cookie)
 {
     return(new O7User(cookie.CompanyId, cookie.BranchId, cookie.Login, cookie.Name, cookie.Password));
 }