namespace GiteaMcp.Config; /// /// JWT 验签配置,与 auth server 共用同款 HS256 对称密钥。 /// 环境变量:Jwt__Issuer, Jwt__Audience, Jwt__SigningKey__Current, Jwt__SigningKey__Previous /// public class JwtOptions { public const string SectionName = "Jwt"; /// 期望的 iss claim(你的 auth server 的 issuer URL),必须通过 env 注入 public string Issuer { get; set; } = string.Empty; /// 期望的 aud claim,默认 gitea public string Audience { get; set; } = "gitea"; public SigningKeyPair SigningKey { get; set; } = new(); public class SigningKeyPair { /// 当前签名密钥(HS256 对称密钥),env: Jwt__SigningKey__Current public string Current { get; set; } = string.Empty; /// 上一轮密钥,密钥轮换过渡期用,env: Jwt__SigningKey__Previous(可为空) public string? Previous { get; set; } } }