Skip to content

Commit

Permalink
Use accessToken across the module
Browse files Browse the repository at this point in the history
  • Loading branch information
hansemannn committed Jun 11, 2016
1 parent e3042e4 commit 96120d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
iphone/build
/iphone/ti.accountkit.xcodeproj/project.xcworkspace/xcuserdata/hans.xcuserdatad/UserInterfaceState.xcuserstate
16 changes: 6 additions & 10 deletions iphone/Classes/TiAccountkitModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,7 @@ - (void)cancelLogin:(id)unused

- (void)currentAccessToken
{
return @{
@"accountID": [[accountKit currentAccessToken] accountID],
@"applicationID": [[accountKit currentAccessToken] applicationID],
@"lastRefresh": [[accountKit currentAccessToken] lastRefresh],
@"tokenRefreshInterval": NUMDOUBLE([[accountKit currentAccessToken] tokenRefreshInterval]),
@"tokenString": [[accountKit currentAccessToken] tokenString],
};
return [self dictionaryFromAccessToken:[accountKit currentAccessToken]];
}

- (NSString*)graphVersion
Expand Down Expand Up @@ -193,9 +187,11 @@ - (void)viewController:(UIViewController<AKFViewController> *)viewController did
- (NSDictionary*)dictionaryFromAccessToken:(id<AKFAccessToken>)accessToken
{
return @{
@"accountID": [accessToken accountID],
@"applicationID": [accessToken applicationID],
@"lastRefresh": [accessToken lastRefresh],
@"accountID": [accessToken accountID],
@"applicationID": [accessToken applicationID],
@"lastRefresh": [accessToken lastRefresh],
@"tokenRefreshInterval": NUMDOUBLE([accessToken tokenRefreshInterval]),
@"tokenString": [accessToken tokenString]
};
}

Expand Down
Binary file not shown.

0 comments on commit 96120d3

Please sign in to comment.