use of com.salesforce.androidsdk.auth.OAuth2.TokenEndpointResponse in project SalesforceMobileSDK-Android by forcedotcom.
the class ManagerTestCase method initRestClient.
private RestClient initRestClient() throws Exception {
httpAccess = new HttpAccess(null, "dummy-agent");
final TokenEndpointResponse refreshResponse = OAuth2.refreshAuthToken(httpAccess, new URI(TestCredentials.LOGIN_URL), TestCredentials.CLIENT_ID, TestCredentials.REFRESH_TOKEN, null);
final String authToken = refreshResponse.authToken;
final ClientInfo clientInfo = new ClientInfo(new URI(TestCredentials.INSTANCE_URL), new URI(TestCredentials.LOGIN_URL), new URI(TestCredentials.IDENTITY_URL), TestCredentials.ACCOUNT_NAME, TestCredentials.USERNAME, TestCredentials.USER_ID, TestCredentials.ORG_ID, null, null, null, null, null, null, TestCredentials.PHOTO_URL, null, null, null, null, null, null, null, null, null);
return new RestClient(clientInfo, authToken, httpAccess, null);
}
Aggregations