You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.2 KiB
2.2 KiB
认证服务配置管理
**本文档引用的文件** - [appsettings.json](file://aspnet-core/services/LY.MicroService.AuthServer/appsettings.json) - [appsettings.Development.json](file://aspnet-core/services/LY.MicroService.AuthServer/appsettings.Development.json) - [AuthServerModule.Configure.cs](file://aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.Configure.cs) - [OpenIddictApplicationTokenLifetimeConsts.cs](file://aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Application.Contracts/LINGYUN/Abp/OpenIddict/Applications/OpenIddictApplicationTokenLifetimeConsts.cs) - [LINGYUN.Abp.Authentication.WeChat/README.md](file://aspnet-core/framework/authentication/LINGYUN.Abp.Authentication.WeChat/README.md) - [LINGYUN.Abp.Authentication.QQ/README.md](file://aspnet-core/framework/authentication/LINGYUN.Abp.Authentication.QQ/README.md)目录
简介
本文件全面文档化认证服务的配置体系,详细解释 appsettings.json 中与认证相关的所有配置项,包括 JWT 令牌配置、OAuth2.0/OpenID Connect 设置、客户端注册配置、加密密钥管理等。说明不同环境(开发、测试、生产)下的配置差异和最佳实践。阐述配置文件的加载机制和优先级规则。提供安全配置建议,如密钥轮换策略、令牌有效期设置和 HTTPS 强制要求。通过实际配置示例展示如何定制认证行为,并说明配置错误的常见症状及排查方法。
项目结构
认证服务的配置主要分布在 aspnet-core/services/LY.MicroService.AuthServer 目录下,核心配置文件包括 appsettings.json 和 appsettings.Development.json。这些文件定义了认证服务器的基本行为、连接字符串、日志记录、分布式缓存、CAP 消息总线、Redis 配置、远程服务、OpenIddict 应用程序、身份验证策略