(self, uri, headers, body, oauth_params)
| 109 | return oauth_params |
| 110 | |
| 111 | def _render(self, uri, headers, body, oauth_params): |
| 112 | if self.signature_type == SIGNATURE_TYPE_HEADER: |
| 113 | headers = prepare_headers(oauth_params, headers, realm=self.realm) |
| 114 | elif self.signature_type == SIGNATURE_TYPE_BODY: |
| 115 | if CONTENT_TYPE_FORM_URLENCODED in headers.get("Content-Type", ""): |
| 116 | decoded_body = extract_params(body) or [] |
| 117 | body = prepare_form_encoded_body(oauth_params, decoded_body) |
| 118 | headers["Content-Type"] = CONTENT_TYPE_FORM_URLENCODED |
| 119 | elif self.signature_type == SIGNATURE_TYPE_QUERY: |
| 120 | uri = prepare_request_uri_query(oauth_params, uri) |
| 121 | else: |
| 122 | raise ValueError("Unknown signature type specified.") |
| 123 | return uri, headers, body |
| 124 | |
| 125 | def sign(self, method, uri, headers, body): |
| 126 | """Sign the HTTP request, add OAuth parameters and signature. |
no test coverage detected