I am using Salesforce API and I want to log in automatically(hard code user name and password). I am using REST API and here is the login code which shows login form:
- (void)login {
SFOAuthCredentials *credentials = [[[SFOAuthCredentials alloc] initWithIdentifier:remoteAccessConsumerKey] autorelease];
credentials.protocol = @"https";
credentials.domain = OAuthLoginDomain;
credentials.redirectUri = OAuthRedirectURI;
self.coordinator = [[[SFOAuthCoordinator alloc] initWithCredentials:credentials] autorelease];
self.coordinator.delegate = self;
NSLog(@"%@",self.coordinator);
// remove this line if we want to cache the key, and use refresh flow
//effectively, we are saying, purge the old login and re-authenticate each time
[self.coordinator revokeAuthentication];
//now let's authenticate
[self.coordinator authenticate];
}
What I want, to automatically login (not ask username or password) so where I insert user name and password?