优化SSO登录

This commit is contained in:
yubaolee
2016-12-27 11:25:51 +08:00
parent a3bdcf83ec
commit ccf1269eca
19 changed files with 108 additions and 240 deletions

View File

@@ -2,6 +2,7 @@ using System;
using System.Web;
using System.Web.Mvc;
using Infrastructure;
using Infrastructure.Cache;
using OpenAuth.Domain;
@@ -55,14 +56,13 @@ namespace OpenAuth.App.SSO
{
UserName = model.UserName,
Token = Guid.NewGuid().ToString().GetHashCode().ToString("x"),
InvalidTime = DateTime.Now.AddDays(1),
AppKey = model.AppKey,
CreateTime = DateTime.Now,
IpAddress = HttpContext.Current.Request.UserHostAddress
};
//<2F><><EFBFBD><EFBFBD>Session
new UserAuthSessionService().Create(currentSession);
new ObjCacheProvider<UserAuthSession>().Create(currentSession.Token, currentSession, DateTime.Now.AddDays(10));
result.Success = true;
result.ReturnUrl = appInfo.ReturnUrl;