pub struct OAuthTokenExchangeConfig {
pub client_id_property: String,
pub client_secret_property: String,
pub extra_request_properties: HashMap<String, String>,
pub access_token_property: String,
pub expires_in_property: String,
pub form_encoded: bool,
}Expand description
Wire-level property-name mapping for the OAuth token exchange.
The token endpoint’s request/response contract varies between APIs (e.g. camelCase
clientId/clientSecret, an absent grant_type, or a non-standard access_token
field name). These names are resolved from the API’s OAuth scheme in the IR so the
generated token fetch matches the endpoint’s contract instead of hardcoding a shape.
Fields§
§client_id_property: StringRequest body field name carrying the client id (e.g. "client_id" or "clientId").
client_secret_property: StringRequest body field name carrying the client secret.
extra_request_properties: HashMap<String, String>Additional static request body properties sent verbatim (e.g.
{"grant_type": "client_credentials"}). Empty when the token contract has none.
access_token_property: StringResponse field name that holds the access token (e.g. "access_token").
expires_in_property: StringResponse field name that holds the token lifetime in seconds (e.g. "expires_in").
form_encoded: boolWhether the token request body is application/x-www-form-urlencoded (per RFC 6749
§4.4.2) instead of JSON. Resolved from the token endpoint’s declared content type in
the API definition, so JSON token endpoints keep sending a JSON body.