Return a string that contains the parameters that must be signed.
(self)
| 179 | return '%s?%s' % (self.get_normalized_http_url(), self.to_postdata()) |
| 180 | |
| 181 | def get_normalized_parameters(self): |
| 182 | """Return a string that contains the parameters that must be signed.""" |
| 183 | # Chuck - Make a copy of the parameters so we can modify them |
| 184 | params = dict(self.parameters) |
| 185 | try: |
| 186 | # Exclude the signature if it exists. |
| 187 | del params['oauth_signature'] |
| 188 | except: |
| 189 | pass |
| 190 | # Escape key values before sorting. |
| 191 | key_values = [(escape(_utf8_str(k)), escape(_utf8_str(v))) \ |
| 192 | for k,v in params.items()] |
| 193 | # Sort lexicographically, first after key, then after value. |
| 194 | key_values.sort() |
| 195 | # Combine key value pairs into a string. |
| 196 | return '&'.join(['%s=%s' % (k, v) for k, v in key_values]) |
| 197 | |
| 198 | def get_normalized_http_method(self): |
| 199 | """Uppercases the http method.""" |
no test coverage detected