private void RefreshSession(SalesforceOAuthPlugin plugin) { PlatformAdapter.SendToCustomLogger("HybridMainPage.RefreshSession - Making a REST call to refresh session", LoggingLevel.Verbose); // Cheap REST call to refresh session _client.SendAsync(RestRequest.GetRequestForResources(ApiVersion), response => { if (plugin != null) { if (!response.Success) { PlatformAdapter.SendToCustomLogger( string.Format("HybridMainPage.RefreshSession - Error = {0}", response.Error.ToString()), LoggingLevel.Verbose); plugin.OnAuthenticateError(response.Error.Message); } else { PlatformAdapter.SendToCustomLogger("HybridMainPage.RefreshSession - refresh successful", LoggingLevel.Verbose); plugin.OnAuthenticateSuccess(GetJSONCredentials()); } } }); }
private void RefreshSession(SalesforceOAuthPlugin plugin) { // Cheap REST call to refresh session _client.SendAsync(RestRequest.GetRequestForResources(API_VERSION), (response) => { if (plugin != null) { if (!response.Success) { plugin.OnAuthenticateError(response.Error.Message); } else { plugin.OnAuthenticateSuccess(GetJSONCredentials()); } } }); }