Updates the request parameters based on a single auth_setting :param headers: Header parameters dict to be updated. :param queries: Query parameters tuple list to be updated. :resource_path: A string representation of the HTTP request resource path. :method: A string
(
self,
headers,
queries,
resource_path,
method,
body,
auth_setting
)
| 611 | ) |
| 612 | |
| 613 | def _apply_auth_params( |
| 614 | self, |
| 615 | headers, |
| 616 | queries, |
| 617 | resource_path, |
| 618 | method, |
| 619 | body, |
| 620 | auth_setting |
| 621 | ) -> None: |
| 622 | """Updates the request parameters based on a single auth_setting |
| 623 | |
| 624 | :param headers: Header parameters dict to be updated. |
| 625 | :param queries: Query parameters tuple list to be updated. |
| 626 | :resource_path: A string representation of the HTTP request resource path. |
| 627 | :method: A string representation of the HTTP request method. |
| 628 | :body: A object representing the body of the HTTP request. |
| 629 | The object type is the return value of sanitize_for_serialization(). |
| 630 | :param auth_setting: auth settings for the endpoint |
| 631 | """ |
| 632 | if auth_setting['in'] == 'cookie': |
| 633 | headers['Cookie'] = auth_setting['value'] |
| 634 | elif auth_setting['in'] == 'header': |
| 635 | if auth_setting['type'] != 'http-signature': |
| 636 | headers[auth_setting['key']] = auth_setting['value'] |
| 637 | elif auth_setting['in'] == 'query': |
| 638 | queries.append((auth_setting['key'], auth_setting['value'])) |
| 639 | else: |
| 640 | raise ApiValueError( |
| 641 | 'Authentication token must be in `query` or `header`' |
| 642 | ) |
| 643 | |
| 644 | def __deserialize_file(self, response): |
| 645 | """Deserializes body to file |
no test coverage detected