Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

check for valid token AND keys

  • Loading branch information...
commit fec94d52be5b72def43cf7599d1125adfa4a176b 1 parent ce44fd8
@zachgraves zachgraves authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 Source/YOSSocial/YOSAuthRequest.m
View
4 Source/YOSSocial/YOSAuthRequest.m
@@ -73,7 +73,7 @@ - (YOSRequestToken *)fetchRequestTokenWithCallbackUrl:(NSString *)callbackUrl
YOSRequestToken *requestToken = [YOSRequestToken tokenFromResponse:response.data];
- return (requestToken.key && requestToken.secret) ? requestToken : nil;
+ return (requestToken && requestToken.key && requestToken.secret) ? requestToken : nil;
}
- (NSURL *)authUrlForRequestToken:(YOSRequestToken *)requestToken
@@ -120,7 +120,7 @@ - (YOSAccessToken *)fetchAccessToken:(YOAuthToken *)requestOrAccessToken withVer
YOSAccessToken *accessToken = [YOSAccessToken tokenFromResponse:response.data];
- return (accessToken.key && accessToken.secret) ? accessToken : nil;
+ return (accessToken && accessToken.key && accessToken.secret) ? accessToken : nil;
}
@end
Please sign in to comment.
Something went wrong with that request. Please try again.