mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-18 17:48:01 +08:00
调整部分代码结构
This commit is contained in:
@@ -23,10 +23,10 @@ namespace OpenAuth.WebApi.Areas.SSO.Controllers
|
||||
/// </summary>
|
||||
public class CheckController : Controller
|
||||
{
|
||||
private LoginApp _app;
|
||||
private AuthorizeApp _app;
|
||||
public CheckController()
|
||||
{
|
||||
_app = AutofacExt.GetFromFac<LoginApp>();
|
||||
_app = AutofacExt.GetFromFac<AuthorizeApp>();
|
||||
}
|
||||
|
||||
public bool GetStatus(string token = "", string requestid = "")
|
||||
@@ -44,7 +44,7 @@ namespace OpenAuth.WebApi.Areas.SSO.Controllers
|
||||
string userName = GetUserName(token, requestid);
|
||||
if (!string.IsNullOrEmpty(userName))
|
||||
{
|
||||
return JsonHelper.Instance.Serialize(_app.GetLoginUser(userName));
|
||||
return JsonHelper.Instance.Serialize(_app.GetAccessedControls(userName));
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
|
@@ -38,7 +38,7 @@ namespace OpenAuth.WebApi
|
||||
builder.RegisterModule(new ConfigurationSettingsReader("autofac"));
|
||||
|
||||
//注册app层
|
||||
builder.RegisterAssemblyTypes(Assembly.GetAssembly(typeof (LoginApp)));
|
||||
builder.RegisterAssemblyTypes(Assembly.GetAssembly(typeof (AuthorizeApp)));
|
||||
|
||||
//注册领域服务
|
||||
builder.RegisterAssemblyTypes(Assembly.GetAssembly(typeof(AuthoriseService)))
|
||||
|
Reference in New Issue
Block a user