紧急修复因SSO功能造成的某些页面访问失败

This commit is contained in:
yubaolee
2016-07-14 00:14:24 +08:00
parent 5bfba2aee4
commit 860af2a0f9
6 changed files with 44 additions and 8 deletions

View File

@@ -40,11 +40,22 @@ namespace OpenAuth.WebApi.Areas.SSO.Controllers
}
public string GetUser(string token = "", string requestid = "")
{
string userName = GetUserName(token, requestid);
if (!string.IsNullOrEmpty(userName))
{
return JsonHelper.Instance.Serialize(_app.GetLoginUser(userName));
}
return string.Empty;
}
public string GetUserName(string token, string requestid = "")
{
var user = new UserAuthSessionService().Get(token);
if (user != null)
{
return JsonHelper.Instance.Serialize(_app.GetLoginUser(user.UserName));
return user.UserName;
}
return string.Empty;