namespace {{ namespace }}.Auth;

/// <summary>
/// Credentials extracted from one incoming HTTP request (HTTP transport
/// only) — never sourced from local config/env/keychain. Converts into
/// the same credentials dictionary shape auth strategies already
/// produce, so <see cref="AuthManager.ApplyAuthHeadersAsync"/>'s
/// header-building tail is reused unchanged for both transports; the
/// header name/value are relayed verbatim to the facaded API, whatever
/// they were on the way in (a prefixed <c>Authorization: Basic .../Bearer
/// ...</c> value, or a bare <c>X-Api-Key</c>-style value).
/// </summary>
public sealed record RequestCredentials(string HeaderName, string Value)
{
    public Dictionary<string, string> ToCredentialsMap() => new()
    {
        ["request_header_name"] = HeaderName,
        ["request_header_value"] = Value,
    };
}
