mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-04-05 17:38:01 +08:00
39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using System;
|
|
using System.Linq;
|
|
using Helper.Cache;
|
|
|
|
namespace OpenAuth.App.SSO
|
|
{
|
|
public class AppInfoService : CacheProvider
|
|
{
|
|
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,
|
|
}
|
|
};
|
|
}
|
|
} |