Example #1
0
 public void LoginAndAuthenticateAsTestEditor()
 {
     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.TrySecureSetUserViaCookies(TestUserAccounts.GetEditorUserAccount.Cookie, TestUserAccounts.GetEditorUserAccount.SecureCookie), "*** FAILED TO SET EDITOR VIA COOKIE - Check Certs or account still exists ***");
     Assert.IsTrue(proxy.TrySecureSetUserViaCookies(TestUserAccounts.GetSuperUserAccount.Cookie, TestUserAccounts.GetSuperUserAccount.SecureCookie), "*** FAILED TO SET EDITOR VIA COOKIE - Check Certs or account still exists ***");
 }
Example #2
0
 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 ***");
 }
Example #3
0
 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;
 }
Example #4
0
 public void DNAIdentityWebServiceProxy_TrySetUserWithValidCookie_ExpectOk()
 {
     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", "");
     bool ok = proxy.TrySecureSetUserViaCookies(_identityUserCookie.Value, "");
     Assert.IsTrue(ok);
 }