public static ILicence GetContactInfo(SessionRequest m) { IStateName proxy = XmlRpcProxyGen.Create <IStateName>(); proxy.Url = ConstantsHelper.PROVIDER_URL_DEFAULT; m.Nonce = GuidHelper.Nonce; var response = proxy.GetContactInfo(m.Encrypt <SessionRequest>(ConstantsHelper.KEY_PUBLIC_DEFAULT)); if (string.IsNullOrWhiteSpace(response)) { throw new System.Security.SecurityException("Could not retrieve secure contact details from service."); } return(CryptographyHelper.VerifyAndDeserialize <SessionRequest>(response, ConstantsHelper.KEY_PUBLIC_DEFAULT)); }
public static ISession RenewSession(SessionRequest m) { IStateName proxy = XmlRpcProxyGen.Create <IStateName>(); proxy.Url = ConstantsHelper.PROVIDER_URL_DEFAULT; m.Nonce = GuidHelper.Nonce; m.MachineHash = Convert.ToBase64String(MachineHelper.GetMachineHash()); var response = proxy.RenewSession(m.Encrypt <SessionRequest>(ConstantsHelper.KEY_PUBLIC_DEFAULT)); if (string.IsNullOrWhiteSpace(response)) { return(null); } return(CryptographyHelper.VerifyAndDeserialize <SessionRequest>(response, ConstantsHelper.KEY_PUBLIC_DEFAULT)); }