methodTsmCustomRESTClient.BeginPinnedSession
function BeginPinnedSession: Boolean; virtual;
ONE TLS CONNECTION ACROSS SEVERAL CALLS, and the channel binding of it.
WHY IT EXISTS. A protocol that authenticates INSIDE the tunnel - a challenge in one call and the answer to it in the next - is only as good as its assurance that both calls went down the same channel. Without that, whoever relays the challenge can spend the answer somewhere else. RFC 9266 gives the channel a name; these three make it possible to have one channel to name.
Every other call this component makes builds a transport, uses it and frees it, which is right for a stateless REST API and useless for this.
A LAPSE IS FATAL TO THE SESSION, DELIBERATELY. If the pinned connection is found closed - the peer's keep-alive expired, the network went - the session is marked broken and every later call in it fails. It does NOT reconnect: a new connection is a new channel with a new binding, and an authentication half-completed on the old one would be completed on a channel it was never bound to. Which is the whole attack. Call EndPinnedSession and start again.
NOT A CONNECTION POOL and not a performance feature. Pin only for the exchange that needs it, and end the session as soon as it is done: a held connection is a resource on the server too.