mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-20 18:47:55 +08:00
修改部分文件结构,完善第三方登陆功能
This commit is contained in:
38
OpenAuth.App/SSO/AppInfoService.cs
Normal file
38
OpenAuth.App/SSO/AppInfoService.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenAuth.App.SSO
|
||||
{
|
||||
public class AppInfoService : ServiceContext
|
||||
{
|
||||
public AppInfo Get(string appKey)
|
||||
{
|
||||
//可以从数据库读取
|
||||
return _applist.SingleOrDefault(u => u.AppKey == appKey);
|
||||
}
|
||||
|
||||
private AppInfo[] _applist = new[]
|
||||
{
|
||||
new AppInfo
|
||||
{
|
||||
AppKey = "openauth",
|
||||
Icon = "/Areas/SSO/Content/images/logo.png",
|
||||
IsEnable = true,
|
||||
Remark = "基于DDDLite的权限管理系统",
|
||||
ReturnUrl = "http://localhost:56813",
|
||||
Title = "OpenAuth.Net",
|
||||
CreateTime = DateTime.Now,
|
||||
},
|
||||
new AppInfo
|
||||
{
|
||||
AppKey = "openauthtest",
|
||||
Icon = "/Areas/SSO/Content/images/logo.png",
|
||||
IsEnable = true,
|
||||
Remark = "这只是个模拟的测试站点",
|
||||
ReturnUrl = "http://localhost:53050",
|
||||
Title = "OpenAuth.Net测试站点",
|
||||
CreateTime = DateTime.Now,
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user