2026-09-17 09:01:14 +00:00
|
|
|
|
namespace Sozsoft.Mcp;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// /mcp ucunun OAuth adresleri. Degerler ortam yapilandirmasindan gelir (<c>App:SelfUrl</c>,
|
|
|
|
|
|
/// <c>AuthServer:Authority</c>); localhost, dev ve production ayni kodla calisir.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class McpOAuthOptions
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>API'nin disaridan erisilen kok adresi, sonunda egik cizgi olmadan.</summary>
|
|
|
|
|
|
public string BaseUrl { get; set; } = string.Empty;
|
|
|
|
|
|
|
2026-09-28 09:28:56 +00:00
|
|
|
|
/// <summary>Token'i veren yetkilendirme sunucusu (OpenIddict); keşif belgesindeki issuer ile birebir aynı.</summary>
|
2026-09-17 09:01:14 +00:00
|
|
|
|
public string AuthorizationServer { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Korumali kaynagin tanimlayicisi: istemcinin baglandigi /mcp adresi.</summary>
|
|
|
|
|
|
public string ResourceUrl => BaseUrl + McpConsts.EndpointPath;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Kaynaga ozgu meta veri adresi (RFC 9728 §3.1: yol, well-known onekinin arkasina eklenir).
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string ProtectedResourceMetadataUrl => BaseUrl + McpConsts.ProtectedResourceMetadataPath + McpConsts.EndpointPath;
|
|
|
|
|
|
}
|