Class CbmsSebtApiClientFactory
- Namespace
- SEBT.Portal.StatePlugins.CO.CbmsApi
- Assembly
- SEBT.Portal.StatePlugins.CO.CbmsApi.dll
Factory for creating CbmsSebtApiClient instances with correct Kiota wiring. Uses a shared System.Net.Http.SocketsHttpHandler with pooled connection lifetime for DNS rotation. Each call creates lightweight System.Net.Http.HttpClient instances that share the handler's connection pool.
public static class CbmsSebtApiClientFactory
- Inheritance
-
objectCbmsSebtApiClientFactory
Methods
Create(string, string, string, string, HttpMessageHandler?, ILogger?)
Creates a client configured for the specified CBMS environment. Use CbmsDefaults constants for well-known environment URLs.
public static CbmsSebtApiClient Create(string clientId, string clientSecret, string apiBaseUrl, string tokenEndpointUrl, HttpMessageHandler? httpMessageHandler = null, ILogger? logger = null)
Parameters
clientIdstringOAuth 2.0 client ID.
clientSecretstringOAuth 2.0 client secret.
apiBaseUrlstringBase URL for the CBMS API.
tokenEndpointUrlstringOAuth 2.0 token endpoint URL.
httpMessageHandlerHttpMessageHandlerOptional handler for tests or custom HTTP behavior. When provided, used for both token and API requests.
loggerILoggerOptional logger for token acquisition diagnostics.