예제 #1
0
파일: HomeController.cs 프로젝트: tvene/HPB
        public ActionResult Login()
        {
            var social = new SocialProxy();

            LoginViewData model = new LoginViewData()
            {
                Providers = social.AllProviders
            };

            return this.View(model);
        }
예제 #2
0
파일: HomeController.cs 프로젝트: tvene/HPB
        public ActionResult SocialLogin(string providerName, string returnUrl)
        {
            var social = new SocialProxy();

            //if (social.Login(providerName, this.HttpContext))
            var identity = social.Login(providerName, this.HttpContext);
            if (identity != null)
            {
                if (string.IsNullOrEmpty(returnUrl))
                {
                    return this.RedirectToAction("Index", identity);
                }
                else
                {
                    return this.Redirect(returnUrl);
                }
            }
            else
            {
                return this.RedirectToAction("Login");
            }
        }
예제 #3
0
파일: HomeController.cs 프로젝트: tvene/HPB
        public ActionResult NetworkLogin(string providerName)
        {
            var social = new SocialProxy();

            return this.Redirect(social.GetProvider(providerName).LoginUrl);
        }