public void Stuff3()
        {
            Uri serviceUri = new Uri(svcUri_Base);

            var service = new PersonifyData.PersonifyEntitiesBase(serviceUri);

            service.IgnoreMissingProperties = true;
            service.Credentials             = new System.Net.NetworkCredential(svcLogin, svcPassword);
            var stuff = service.CustomerInfos.Where(x => x.LastName == "Hoiberg").ToList();

            var firstOne = stuff.FirstOrDefault();

            var ssoservice = new com.personifycloud.smemitst.service();

            var personifyIdentifier = firstOne.MasterCustomerId + "|0";

            var customer = ssoservice.SSOCustomerGet(PersonifyVendorName, PersonifyVendorPassword, personifyIdentifier);

            var imsService = new com.personifycloud.smemitst1.IMService();

            var webRoles = imsService.IMSCustomerWebRoleGet(PersonifyVendorName, PersonifyVendorPassword, personifyIdentifier);

            var otherRoles = imsService.IMSCustomerRoleGet(PersonifyVendorName, PersonifyVendorPassword, personifyIdentifier);


            Assert.IsTrue(true);
        }
Exemple #2
0
        public void TestMethod2()
        {
            try
            {
                var encryptedCTForPaul = "f4b1558cae0bc44ee97e2978661f1c5fe4154d3a00c47c2f30aca8eef8287fad78a8c4d55eea1fbe7a58af576980359bcb0ac9c7166f43a73ca6d2a2289eed70";
                //var encryptedCTForEddie = "e51cfa2b7203e1205807b5b5b477d4df9f2129331a2761b1d5f16cc48bc65daf96d64b631234f70308f95ff32803d163736e7c5b1a5a87b9c3c2905e3d65eb7b";


                //encryptedCTForPaul = encryptedCTForEddie;
                var service = new com.personifycloud.smemitst.service();

                var r = service.CustomerTokenDecrypt(PersonifyVendorName, PersonifyVendorPassword, PersonifyVendorBlock, encryptedCTForPaul);

                var ctForPaul = r.CustomerToken;
                // 14fd71c5-dcb2-4112-bbe6-53e5aa5612b2


                var tokenIsValid = service.SSOCustomerTokenIsValid(PersonifyVendorName, PersonifyVendorPassword, ctForPaul);

                var result = service.TIMSSCustomerIdentifierGet(PersonifyVendorName, PersonifyVendorPassword, ctForPaul);

                if (result != null && (result.Errors == null || result.Errors.Length == 0) && !String.IsNullOrEmpty(result.CustomerIdentifier))
                {
                    var splitIdentifer = result.CustomerIdentifier.Split(new char[] { '|' }, 2, StringSplitOptions.RemoveEmptyEntries);

                    if (splitIdentifer.Length == 2)
                    {
                        var masterCustomerId = splitIdentifer[0];
                        var subCustomerId    = splitIdentifer[1];


                        var result2 = service.SSOCustomerGet(PersonifyVendorName, PersonifyVendorPassword, result.CustomerIdentifier);

                        if (result2 != null && (result2.Errors == null || result2.Errors.Length == 0))
                        {
                            var userExists = result2.UserExists;
                            var userName   = result2.UserName;
                            var email      = result2.Email;
                            var flag       = result2.DisableAccountFlag;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                System.Console.WriteLine(ex.ToString());
            }
        }