public void CreateNewUserTest() { string openid = "myopenid"; string friendlyopenid = "friendlyopenid"; string email = "*****@*****.**"; UsersModels user = new UsersModels(); user = user.CreateNewUser(openid, friendlyopenid, email); Assert.AreEqual(openid, user.OpenId[0].OpenId); Assert.AreEqual(friendlyopenid, user.OpenId[0].FriendlyOpenId); }
public ActionResult OpenIdConfirm(RegisterOpenId openId) { UsersModels user = new UsersModels(); user.CreateNewUser(openId.ClaimedOpenId, openId.FriendlyOpenId, openId.Email); FormsAuthenticationService formAuth = new FormsAuthenticationService(); formAuth.SignIn(openId.ClaimedOpenId, false); if (!string.IsNullOrEmpty(openId.ReturnUrl)) { return(Redirect(openId.ReturnUrl)); } else { return(RedirectToAction("Index", "Home")); } }
public ActionResult OpenIdConfirm(RegisterOpenId openId) { UsersModels user = new UsersModels(); user.CreateNewUser(openId.ClaimedOpenId, openId.FriendlyOpenId, openId.Email); FormsAuthenticationService formAuth = new FormsAuthenticationService(); formAuth.SignIn(openId.ClaimedOpenId, false); if (!string.IsNullOrEmpty(openId.ReturnUrl)) return Redirect(openId.ReturnUrl); else return RedirectToAction("Index", "Home"); }