Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
Showing with 16 additions and 1 deletion.
  1. +1 −0 Categories/NSMutableURLRequest+Parameters.m
  2. +4 −1 OAHMAC_SHA1SignatureProvider.m
  3. +3 −0 OAToken.h
  4. +8 −0 OAToken.m
View
1 Categories/NSMutableURLRequest+Parameters.m
@@ -56,6 +56,7 @@ - (NSArray *)parameters {
OARequestParameter *parameter = [[OARequestParameter alloc] initWithName:[[encodedPairElements objectAtIndex:0] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]
value:[[encodedPairElements objectAtIndex:1] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
[requestParameters addObject:parameter];
+ [parameter release];
}
return requestParameters;
View
5 OAHMAC_SHA1SignatureProvider.m
@@ -28,6 +28,7 @@
#include "hmac.h"
#include "Base64Transcoder.h"
+#import <CommonCrypto/CommonHMAC.h>
@implementation OAHMAC_SHA1SignatureProvider
@@ -38,8 +39,10 @@ - (NSString *)name {
- (NSString *)signClearText:(NSString *)text withSecret:(NSString *)secret {
NSData *secretData = [secret dataUsingEncoding:NSUTF8StringEncoding];
NSData *clearTextData = [text dataUsingEncoding:NSUTF8StringEncoding];
+
unsigned char result[20];
- hmac_sha1((unsigned char *)[clearTextData bytes], [clearTextData length], (unsigned char *)[secretData bytes], [secretData length], result);
+ // hmac_sha1((unsigned char *)[clearTextData bytes], [clearTextData length], (unsigned char *)[secretData bytes], [secretData length], result);
+ CCHmac(kCCHmacAlgSHA1, [secretData bytes], [secretData length], [clearTextData bytes], [clearTextData length], result);
//Base64 Encoding
View
3 OAToken.h
@@ -69,4 +69,7 @@
+ (void)removeFromUserDefaultsWithServiceProviderName:(const NSString *)provider prefix:(const NSString *)prefix;
+//http parsing
+-(BOOL)parseHTTPKey:(NSString *)paramKey value:(id)body;
+
@end
View
8 OAToken.m
@@ -96,11 +96,19 @@ - (id)initWithHTTPResponseBody:(const NSString *)body {
if ([lowerCase isEqualToString:@"true"] || [lowerCase isEqualToString:@"t"]) {
renew = YES;
}
+ } else{
+ NSString *httpKey = [elements objectAtIndex:0];
+ NSString *httpValue = [elements objectAtIndex:1];
+ [self parseHTTPKey:httpKey value:httpValue];
}
}
return [self initWithKey:aKey secret:aSecret session:aSession duration:aDuration
attributes:attrs created:creationDate renewable:renew];
+}
+
+-(void)parseHTTPKey:(NSString *)httpKey value:(id)httpValue{
+
}
- (id)initWithUserDefaultsUsingServiceProviderName:(const NSString *)provider prefix:(const NSString *)prefix {

No commit comments for this range

Something went wrong with that request. Please try again.