public class login : IHttpHandler{public void ProcessRequest(HttpContext context){//验证用户名密码string loginName = context.Request.Form["loginName"];base64 b6 = new base64();string password = b6.decodeBase64(context.Request.Form["password"]);
loginReturn lr = new loginReturn();
int userId = SSO.Operate.ValidateUserInfo(loginName, password);if (userId > 0){SSORequest ssorequest = new SSORequest();//获取用户Model,并将相应的值赋给SSORequestif (Authentication.CreateAppToken(ssorequest)){lr.userId = userId;lr.AA_Token = ssorequest.AA_Token;context.Response.Write(JsonHelper.JsonSerializer(lr));}}lr.userId = -1;lr.AA_Token = "";context.Response.Write(JsonHelper.JsonSerializer(lr));}
public bool IsReusable{get{return false;}}}}
- 3 回答
- 0 关注
- 298 浏览
添加回答
举报
0/150
提交
取消