using System.Security.Cryptography.X509Certificates; namespace Csob.Credentials; /// /// Fully resolved set of per-request credentials and PSU context used to call the ČSOB PSD2 API. /// Built from request headers by ; never logged. /// public sealed record CsobCredentials { /// OAuth2 Bearer access token (forwarded as Authorization: Bearer). public required string AccessToken { get; init; } /// ČSOB application API key (forwarded as APIKEY). public required string ApiKey { get; init; } /// TPP organisation name (forwarded as TPP-Name). public required string TppName { get; init; } /// /// eIDAS client certificate (with private key) for mutual TLS. Optional at the type level so /// metadata endpoints can resolve context, but required for any real upstream call. /// public X509Certificate2? Certificate { get; init; } /// Whether the PSU is online for this request (User-Involved); defaults to false. public bool UserInvolved { get; init; } /// Optional PSU IP address (User-IP-Address). public string? UserIpAddress { get; init; } }