/// <summary> /// 用户登录 /// </summary> /// <param name="UserName">用户名</param> /// <param name="PWD">用户密码</param> /// <param name="LoginTicket">登录凭据值</param> /// <param name="RedirectUrl">跳转地址</param> /// <returns>SSO返回信息</returns> public SSOResponse UserLoginPassword(string UserName, string PWD, string LoginTicket, PasswordType PwdType) { SSOResponse response = new SSOResponse(); SSORemote.PasswordType _pwdtype = (EyouSoft.SSOComponent.SSORemote.PasswordType)Convert.ToInt32(PwdType); EyouSoft.SSOComponent.SSORemote.SSOResponse remoteResponse = RemoteLogin.UserLoginPassword(UserName, PWD, LoginTicket, _pwdtype); response.IsValid = remoteResponse.IsValid; response.UserInfo = this.ConvertToUser(remoteResponse.UserInfo); //SetCache(); LocalLogin.UpdateUserInfo(response.UserInfo); return(response); }
/// <summary> /// 用户登录 /// </summary> /// <param name="UserName">用户名</param> /// <param name="PWD">用户密码</param> /// <param name="LoginTicket">登录凭据值</param> /// <param name="PwdType">登录密码类型</param> /// <returns>SSO返回信息</returns> public SSOResponse UserLoginPassword(string UserName, string PWD, string LoginTicket, PasswordType PwdType) { SSOResponse response = new SSOResponse(); SSORemote.PasswordType _pwdtype = (EyouSoft.SSOComponent.SSORemote.PasswordType)Convert.ToInt32(PwdType); EyouSoft.SSOComponent.SSORemote.SSOResponse remoteResponse = RemoteLogin.UserLoginPassword(UserName, PWD, LoginTicket, _pwdtype); if (remoteResponse != null && !string.IsNullOrEmpty(remoteResponse.SSOScript)) { response.IsValid = remoteResponse.IsValid; response.UserInfo = EyouSoft.Common.SerializationHelper.InvertJSON <UserInfo>(remoteResponse.SSOScript); if (response.UserInfo != null && response.UserInfo.IsEnable) { //response.UserInfo = this.ConvertToUser(remoteResponse.UserInfo); //SetCache(); LocalLogin.UpdateUserInfo(response.UserInfo); } } return(response); }