Permalink
Browse files

Remove debug NSLogs and work with 3.0

  • Loading branch information...
1 parent 01ce025 commit a344f1a46cba8344199bd74af963e6914adbaf2f @jdg jdg committed Jul 4, 2009
Showing with 29 additions and 29 deletions.
  1. +1 −1 Categories/NSMutableURLRequest+Parameters.m
  2. +2 −2 OAMutableURLRequest.m
  3. +4 −4 OAToken.h
  4. +10 −10 OAToken.m
  5. +12 −12 OAuthConsumer.h
View
2 Categories/NSMutableURLRequest+Parameters.m
@@ -47,7 +47,7 @@ - (NSArray *)parameters {
if (encodedParameters == nil || [encodedParameters isEqualToString:@""]) {
return nil;
}
- NSLog(@"raw parameters %@", encodedParameters);
+// NSLog(@"raw parameters %@", encodedParameters);
NSArray *encodedParameterPairs = [encodedParameters componentsSeparatedByString:@"&"];
NSMutableArray *requestParameters = [NSMutableArray arrayWithCapacity:[encodedParameterPairs count]];
View
4 OAMutableURLRequest.m
@@ -98,7 +98,7 @@ - (id)initWithURL:(NSURL *)aUrl
- (void)prepare {
// sign
- NSLog(@"Base string is: %@", [self _signatureBaseString]);
+// NSLog(@"Base string is: %@", [self _signatureBaseString]);
signature = [signatureProvider signClearText:[self _signatureBaseString]
withSecret:[NSString stringWithFormat:@"%@&%@",
consumer.secret,
@@ -164,7 +164,7 @@ - (NSString *)_signatureBaseString {
NSArray *sortedPairs = [parameterPairs sortedArrayUsingSelector:@selector(compare:)];
NSString *normalizedRequestParameters = [sortedPairs componentsJoinedByString:@"&"];
- NSLog(@"Normalized: %@", normalizedRequestParameters);
+// NSLog(@"Normalized: %@", normalizedRequestParameters);
// OAuth Spec, Section 9.1.2 "Concatenate Request Elements"
return [NSString stringWithFormat:@"%@&%@&%@",
[self HTTPMethod],
View
8 OAToken.h
@@ -36,11 +36,11 @@
BOOL renewable;
BOOL forRenewal;
}
-@property(copy, readwrite) NSString *key;
-@property(copy, readwrite) NSString *secret;
-@property(copy, readwrite) NSString *session;
+@property(retain, readwrite) NSString *key;
+@property(retain, readwrite) NSString *secret;
+@property(retain, readwrite) NSString *session;
@property(retain, readwrite) NSNumber *duration;
-@property(retain, readwrite) NSDictionary *attributes;
+@property(retain, readwrite) NSMutableDictionary *attributes;
@property(readwrite, getter=isForRenewal) BOOL forRenewal;
- (id)initWithKey:(NSString *)aKey secret:(NSString *)aSecret;
View
20 OAToken.m
@@ -105,14 +105,14 @@ - (id)initWithHTTPResponseBody:(const NSString *)body {
- (id)initWithUserDefaultsUsingServiceProviderName:(const NSString *)provider prefix:(const NSString *)prefix {
[super init];
- key = [OAToken loadSetting:@"key" provider:provider prefix:prefix];
- secret = [OAToken loadSetting:@"secret" provider:provider prefix:prefix];
- session = [OAToken loadSetting:@"session" provider:provider prefix:prefix];
- duration = [OAToken loadSetting:@"duration" provider:provider prefix:prefix];
- attributes = [OAToken loadSetting:@"attributes" provider:provider prefix:prefix];
+ self.key = [OAToken loadSetting:@"key" provider:provider prefix:prefix];
+ self.secret = [OAToken loadSetting:@"secret" provider:provider prefix:prefix];
+ self.session = [OAToken loadSetting:@"session" provider:provider prefix:prefix];
+ self.duration = [OAToken loadSetting:@"duration" provider:provider prefix:prefix];
+ self.attributes = [OAToken loadSetting:@"attributes" provider:provider prefix:prefix];
created = [OAToken loadSetting:@"created" provider:provider prefix:prefix];
renewable = [[OAToken loadSetting:@"renewable" provider:provider prefix:prefix] boolValue];
-
+
if (![self isValid]) {
[self autorelease];
return nil;
@@ -124,10 +124,10 @@ - (id)initWithUserDefaultsUsingServiceProviderName:(const NSString *)provider pr
#pragma mark dealloc
- (void)dealloc {
- [key release];
- [secret release];
- [duration release];
- [attributes release];
+ self.key = nil;
+ self.secret = nil;
+ self.duration = nil;
+ self.attributes = nil;
[super dealloc];
}
View
24 OAuthConsumer.h
@@ -25,16 +25,16 @@
#import <Foundation/Foundation.h>
#import "OAProblem.h"
-#import "OAuthConsumer/OAToken.h"
-#import "OAuthConsumer/OAConsumer.h"
-#import "OAuthConsumer/OAMutableURLRequest.h"
-#import "OAuthConsumer/NSString+URLEncoding.h"
-#import "OAuthConsumer/NSMutableURLRequest+Parameters.h"
-#import "OAuthConsumer/NSURL+Base.h"
-#import "OAuthConsumer/OASignatureProviding.h"
-#import "OAuthConsumer/OAHMAC_SHA1SignatureProvider.h"
-#import "OAuthConsumer/OAPlaintextSignatureProvider.h"
-#import "OAuthConsumer/OARequestParameter.h"
-#import "OAuthConsumer/OAServiceTicket.h"
-#import "OAuthConsumer/OADataFetcher.h"
+#import "OAToken.h"
+#import "OAConsumer.h"
+#import "OAMutableURLRequest.h"
+#import "NSString+URLEncoding.h"
+#import "NSMutableURLRequest+Parameters.h"
+#import "NSURL+Base.h"
+#import "OASignatureProviding.h"
+#import "OAHMAC_SHA1SignatureProvider.h"
+#import "OAPlaintextSignatureProvider.h"
+#import "OARequestParameter.h"
+#import "OAServiceTicket.h"
+#import "OADataFetcher.h"
#import "OATokenManager.h"

0 comments on commit a344f1a

Please sign in to comment.