public JavaScriptResult Login(string name) { //SSOSameDomain sso = new SSOSameDomain(HttpContext); //sso.LogIn(cookeName, new TimeSpan(0, 1, 0), name); SSOCrossDomain sso = new SSOCrossDomain(HttpContext); sso.LogIn(cookieName, new TimeSpan(0, 3, 0), name, TempData["RedirectUrl"]?.ToString()); return(JavaScript(sso.Operation.PerformJavascript)); }
/// <summary> /// 用户登录方法 /// </summary> private void LoginView_Submit(object sender, AuthorizeEventArgs e) { string userName = LoginView.UserName; string password = LoginView.Password; if (ValidationUserInfo(userName, password)) { ////同域单点登录 //SSOSameDomain sso = new SSOSameDomain(e.Page); //sso.LogIn("CookiesTest", new TimeSpan(0, 1, 0), userName); //跨域单点登录 SSOCrossDomain cross = new SSOCrossDomain(e.Page); cross.LogIn("CookiesTest", new TimeSpan(0, 1, 0), userName); } }