mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-15 23:13:40 +08:00

fix issue #I3PE3R 会签节点异常,提示'-1' was not present in ... fix CodeSmith生成的后端代码报错 https://gitee.com/yubaolee/OpenAuth.Core/issues/I3OXJZ
39 lines
986 B
C#
39 lines
986 B
C#
using Infrastructure;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.Extensions.Options;
|
|
using OpenAuth.App;
|
|
|
|
namespace OpenAuth.WebApi.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 系统配置信息
|
|
/// </summary>
|
|
[Route("api/[controller]/[action]")]
|
|
[ApiController]
|
|
[ApiExplorerSettings(GroupName = "SysConf")]
|
|
public class SysConfController :ControllerBase
|
|
{
|
|
private IOptions<AppSetting> _appConfiguration;
|
|
|
|
public SysConfController(IOptions<AppSetting> appConfiguration)
|
|
{
|
|
_appConfiguration = appConfiguration;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 是否Identity认证
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[AllowAnonymous]
|
|
[HttpGet]
|
|
public Response<bool> IsIdentityAuth()
|
|
{
|
|
return new Response<bool>
|
|
{
|
|
Result = _appConfiguration.Value.IsIdentityAuth
|
|
};
|
|
}
|
|
}
|
|
}
|