Files
OpenAuth.Net/Infrastructure/AppSetting.cs
2026-07-06 21:14:28 +08:00

59 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.Collections.Generic;
namespace Infrastructure
{
/// <summary>
/// 配置项
/// </summary>
public class AppSetting
{
public AppSetting()
{
SSOPassport = "http://localhost:52789";
Version = "";
UploadPath = "";
IdentityServerUrl = "";
}
/// <summary>
/// SSO地址
/// </summary>
public string SSOPassport { get; set; }
/// <summary>
/// 版本信息
/// 如果为demo,则屏蔽Post请求
/// </summary>
public string Version { get; set; }
/// <summary>
/// 数据库类型 SqlServer、MySql
/// </summary>
public Dictionary<string, string> DbTypes { get; set; }
/// <summary> 附件上传路径</summary>
public string UploadPath { get; set; }
//identity授权的地址
public string IdentityServerUrl { get; set; }
/// <summary>
/// Redis服务器配置
/// </summary>
public string RedisConf { get; set; }
/// <summary>
/// JWT签名密钥用于本地认证模式下生成和验证JWT Token
/// </summary>
public string JwtSecret { get; set; } = "openauth_default_jwt_secret_key_2024";
/// <summary>
/// JWT Token过期天数默认10天
/// </summary>
public int JwtExpireDays { get; set; } = 10;
//是否是Identity授权方式
public bool IsIdentityAuth => !string.IsNullOrEmpty(IdentityServerUrl);
}
}