Skip to content
This repository was archived by the owner on May 10, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
build/
xcuserdata/
*.xctimeline
*.xccheckout
*.xcscmblueprint
*.mode2v3
*.pbxuser

Carthage/Build

.DS_Store
49 changes: 0 additions & 49 deletions NSData+Base64.h

This file was deleted.

259 changes: 0 additions & 259 deletions NSData+Base64.m

This file was deleted.

4 changes: 2 additions & 2 deletions OAuth+Additions.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ + (NSDictionary *)ab_parseURLQueryString:(NSString *)query

- (NSString *)ab_actualPath
{
NSString* cfPath = [(NSString*)CFURLCopyPath((CFURLRef)self) autorelease];
NSString* cfPath = (NSString*)CFBridgingRelease(CFURLCopyPath((CFURLRef)self));
return cfPath;
}

Expand Down Expand Up @@ -67,7 +67,7 @@ + (NSString *)ab_GUID
CFUUIDRef u = CFUUIDCreate(kCFAllocatorDefault);
CFStringRef s = CFUUIDCreateString(kCFAllocatorDefault, u);
CFRelease(u);
return [(NSString *)s autorelease];
return (NSString *)CFBridgingRelease(s);
}

@end
22 changes: 22 additions & 0 deletions OAuthCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,25 @@ extern NSString *OAuthorizationHeaderWithCallback(NSURL *url,
NSString *_oAuthToken,
NSString *_oAuthTokenSecret,
NSString *_oAuthCallback);

typedef NS_ENUM(uint8_t, OAuthCoreSignatureMethod)
{
// OAuthCoreSignatureMethod_PLAIN_TEXT, // allowed by RFC5849, but you gotta be joking, right?
// OAuthCoreSignatureMethod_RSA_SHA1, // allowed by RFC5849, but not supported here
OAuthCoreSignatureMethod_HMAC_SHA1, // allowed by RFC5849
OAuthCoreSignatureMethod_HMAC_SHA256, // non-standard, but...

OAuthCoreSignatureMethod_Default = OAuthCoreSignatureMethod_HMAC_SHA1,
};

extern NSString *OAuthHeader(
NSURL *url,
NSString *method,
NSData *body,
NSString *_oAuthConsumerKey,
NSString *_oAuthConsumerSecret,
NSString *_oAuthToken, // nullable
NSString *_oAuthTokenSecret, // nullable
NSString *_oAuthVerifier, // nullable,
NSString *_oAuthCallback, // nullable
OAuthCoreSignatureMethod sigMethod);
Loading