using ASHermed.SinoInterface.Tools;
using PoJun.Util.Helpers;
using System;
using System.Collections.Generic;
using System.Text;

namespace ASHermed.SingleSignOnFramework
{
    /// <summary>
	/// 单点登录服务配置信息
	/// 创建人：杨江军
	/// 创建时间：2020/4/8 16:46:34
	/// </summary>
	public class SingleSignOnConfig
    {
        #region 初始化

        /// <summary>
        /// 初始化
        /// </summary>
        /// <returns></returns>
        public static SingleSignOnConfig GetInstance()
        {
            return Newtonsoft.Json.JsonConvert.DeserializeObject<SingleSignOnConfig>(ConfigurationManager.AppSettings[nameof(SingleSignOnConfig)]);
        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        private SingleSignOnConfig()
        {

        }

        #endregion

        /// <summary>
        /// 接口域名
        /// </summary>
        public string ApiHost { get; set; }

        /// <summary>
        /// 系统ID
        /// </summary>
        public long SystemId { get; set; }

        /// <summary>
        /// 是否启用单点登录
        /// </summary>
        public bool IsEnable { get; set; }

        /// <summary>
        /// 需要排除单点登录验证的控制器名称(控制器名称全小写)
        /// </summary>
        public List<string> ExcludeControllerNames { get; set; }

        /// <summary>
        /// 私钥(用于调用特殊接口)
        /// </summary>
        public string Key { get; set; }

        /// <summary>
        /// 日志系统系统ID
        /// </summary>
        public long LogsSystemId { get; set; }
    }
}
