public void LoginWithUserNameAndPassword() { IDnaIdentityWebServiceProxy proxy = new IdentityRestSignIn(); proxy.Initialise("https://api.test.bbc.co.uk/opensso/identityservices/IdentityServices;dna;http://www-cache.reith.bbc.co.uk:80;logging", ""); Assert.IsTrue(proxy.TrySetUserViaUserNamePassword(TestUserAccounts.GetEditorUserAccount.UserName, TestUserAccounts.GetEditorUserAccount.Password), "*** FAILED TO SET EDITOR VIA COOKIE - Check Certs or account still exists ***"); string cookie = proxy.GetCookieValue; string secureCookie = proxy.GetSecureCookieValue; Assert.IsTrue(proxy.TrySecureSetUserViaCookies(cookie, secureCookie), "*** FAILED TO SET EDITOR VIA COOKIE - Check Certs or account still exists ***"); }
public static void GetUserCookies(string userName, string password, out string cookie, out string secureCookie) { IDnaIdentityWebServiceProxy proxy = new IdentityRestSignIn(); proxy.Initialise("https://api.test.bbc.co.uk/opensso/identityservices/IdentityServices;dna", ""); proxy.TrySetUserViaUserNamePassword(userName, password); cookie = proxy.GetCookieValue; secureCookie = proxy.GetSecureCookieValue; }