pjaspers/Tin — pull request #5 by Inferis (2012-02-10 10:38:54+00:00)
Title: Authentication shizzle

Reworked authentication, is delegated to seperate object now.

Added implementation for BasicAuthentication.
Added implementation for OAuth.

Basic authentication:

[[tin authenticateWithUsername:@"user" password:@"passwd"] get:@"http://url" success:^(TinResponse *response) {
...
}];

OAuth:

[[tin signedWithClientKey:@"insert-key-here" clientSecret:@"insert-secret-here"] get:@"http://url" query:[NSDictionary dictionaryWithObject:@"oob" forKey:@"oauth_callback"] success:^(TinResponse *response) {
response.parseMethod = TinFormURLParseMethod;
NSDictionary* keys = response.parsedResponse; // contains oauth_token and oauth_token_secret, for instance
}];