TTMSMCPClientTransportHTTP.OAuth Property
Authorization helper that answers a server's refusal of an unauthorized request and holds the resulting access token.
API unit family: TMS.MCP.Client.Transport.HTTP
Declaring type: TTMSMCPClientTransportHTTP
Type: TTMSMCPClientOAuth
Syntax
property OAuth: TTMSMCPClientOAuth;
Remarks
The transport creates this instance and releases it when it is destroyed, so use it to configure the flow rather than replacing it with another one. When a request is refused as unauthorized, the challenge is handed to this helper; the refused message is held back and sent again as soon as authorization succeeds, while a failure stops the transport and is reported through OnHTTPResponse. Only the message that triggered the challenge is held back, so if several refusals arrive close together only the last one is repeated. Every request carries the token held here while it is still valid.