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,并将相应的值赋给SSORequest
if (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;
}
}
}
}
你哪些地方看不懂?
你给解释下 方便的话加个QQ!