Created
April 2, 2014 08:12
-
-
Save zigdanis/9929988 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (DBRestClient *)restClient | |
{ | |
if (!self.user_identifier) | |
return nil; | |
if (!_restClient) | |
{ | |
if ([[DBSession sharedSession] credentialStoreForUserId:self.user_identifier]) | |
{ | |
_restClient = [[DBRestClient alloc] initWithSession:[DBSession sharedSession] userId:self.user_identifier]; | |
} | |
else | |
{ | |
MPOAuthCredentialConcreteStore *store = [[DBSession sharedSession] baseCredentialStore]; | |
[store setKeysForPersistenceResponseString:self.persistence]; | |
_restClient = [[DBRestClient alloc] initWithSession:[DBSession sharedSession] credinalStore:store userId:self.user_identifier]; | |
} | |
_restClient.delegate = self; | |
} | |
return _restClient; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment