mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-20 10:37:55 +08:00
优化SSO登录
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user