Beispiel #1
0
        /// <summary>
        ///     Creates a new instance of the <see cref="Client" /> class.
        /// </summary>
        internal Client(IClientAppInfo clientapplication, IClientUserInfo clientUserAccount)
        {
            Guard.NotNull(() => clientapplication, clientapplication);
            Guard.NotNull(() => clientUserAccount, clientUserAccount);

            ClientApplication = clientapplication;
            ClientUserAccount = clientUserAccount;
        }
Beispiel #2
0
        private static UserAccount CreateUserAccount(IClientUserInfo userInfo)
        {
            var account = userInfo.AuthInfo.ConvertTo <UserAccount>();

            account.Forenames   = account.Username;
            account.Forenames   = userInfo.AuthInfo.Username;
            account.Surname     = userInfo.AuthInfo.Username;
            account.Email       = userInfo.Email;
            account.MobilePhone = string.Empty;
            account.Address     = new Address();
            account.Roles       = string.Join(", ", userInfo.AuthInfo.Roles);

            return(account);
        }