Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Davis2014-02-19 17:17:04 -0500
committerGerrit Code Review @ Eclipse.org2014-03-03 19:45:53 -0500
commitf22413b50b85920a132e804921dae9464b60904a (patch)
tree935e301e1ec8285f5d7f7f6b8f118a39a9633d05 /org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal
parent5a436b4807e44da852cd36e84f4a34998afcc3ba (diff)
downloadorg.eclipse.mylyn.tasks-f22413b50b85920a132e804921dae9464b60904a.tar.gz
org.eclipse.mylyn.tasks-f22413b50b85920a132e804921dae9464b60904a.tar.xz
org.eclipse.mylyn.tasks-f22413b50b85920a132e804921dae9464b60904a.zip
428504: bugzilla connector is logged out after credentials migrated from
keyring Change-Id: I033be68acf2686a087058a7474289c842d7deebe Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=428504
Diffstat (limited to 'org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/TaskRepositoryKeyringMigrator.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/TaskRepositoryKeyringMigrator.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/TaskRepositoryKeyringMigrator.java
index d86d87832..a552c4ea4 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/TaskRepositoryKeyringMigrator.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/TaskRepositoryKeyringMigrator.java
@@ -20,6 +20,8 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.commons.core.StatusHandler;
+import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
+import org.eclipse.mylyn.commons.net.AuthenticationType;
import org.eclipse.mylyn.commons.repositories.core.auth.ICredentialsStore;
import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
import org.eclipse.mylyn.tasks.core.TaskRepository;
@@ -54,6 +56,17 @@ public class TaskRepositoryKeyringMigrator extends KeyringMigrator<TaskRepositor
}
@Override
+ protected void migrateCredentials(TaskRepository location) {
+ super.migrateCredentials(location);
+ // clear the cachedUserName in case it was set before the migration ran
+ AuthenticationCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY);
+ if (credentials != null) {
+ location.setCredentials(AuthenticationType.REPOSITORY, credentials,
+ location.getSavePassword(AuthenticationType.REPOSITORY));
+ }
+ }
+
+ @Override
protected Map<String, String> getAuthorizationInfo(String url) throws MalformedURLException {
try {
return super.getAuthorizationInfo(url);

Back to the top