sometimeleft/stl-oauth-client — pull request #1 by jonah-carbonfive (2012-06-22 17:16:59+00:00)
Title: Create authorization header based on request objects

Replace

- (NSString *) authorizationHeaderValueForMethod:(NSString *)method path:(NSString *)path parameters:(NSDictionary *)parameters;

with

- (NSString *) authorizationHeaderValueForRequest:(NSURLRequest *)request;

Building the authorization header from the params dictionary had a couple of bugs.

1. Non-string values would cause a crash when calling `URLEncodeString(obj)`. It is however perfectly acceptable to pass arrays, dictionaries, NSNumbers, and other objects as parameters to an AFNetworking request.
2. STLOAuthClient attempted to correctly sorted multiple URL parameters with the same key but there was no way to produce such a combination when given a dictionary argument.
3. Any attempt to construct URL encoded strings from a params dictionary assumes that STLOAuthClient will choose the same string representation of those objects as was used to build the request the authorization header is eventually added to. That makes it difficult to reliably implement support for a params dictionary.