File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 14
14
#import " NXOAuth2Account.h"
15
15
16
16
@interface NXOAuth2Account (Private)
17
+
17
18
- (id )initAccountWithOAuthClient : (NXOAuth2Client *)oauthClient accountType : (NSString *)accountType ;
19
+ - (id )initAccountWithAccessToken : (NXOAuth2AccessToken *)accessToken accountType : (NSString *)accountType ;
20
+
18
21
@end
Original file line number Diff line number Diff line change @@ -42,12 +42,21 @@ @implementation NXOAuth2Account (Private)
42
42
#pragma mark Lifecycle
43
43
44
44
- (id )initAccountWithOAuthClient : (NXOAuth2Client *)anOAuthClient accountType : (NSString *)anAccountType ;
45
+ {
46
+ self = [self initAccountWithAccessToken: anOAuthClient.accessToken
47
+ accountType: anAccountType];
48
+ if (self) {
49
+ oauthClient = anOAuthClient;
50
+ }
51
+ return self;
52
+ }
53
+
54
+ - (id )initAccountWithAccessToken : (NXOAuth2AccessToken *)anAccessToken accountType : (NSString *)anAccountType ;
45
55
{
46
56
self = [super init ];
47
57
if (self) {
48
58
accountType = anAccountType;
49
- oauthClient = anOAuthClient;
50
- accessToken = oauthClient.accessToken ;
59
+ accessToken = anAccessToken;
51
60
oauthClient.delegate = self;
52
61
identifier = [NSString nxoauth2_stringWithUUID ];
53
62
}
You can’t perform that action at this time.
0 commit comments