aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-04-10 17:44:41 (EDT)
committerChris Aniszczyk2011-04-11 07:25:34 (EDT)
commite9fe86833ecc7c2f82fda1f427df3fad9a1c493e (patch)
treeec4481cab8c25db827251a3125996afbe63c5740
parentad7ca72365ecf4144bb57c25a41a6c2ccc7541f4 (diff)
downloadegit-github-e9fe86833ecc7c2f82fda1f427df3fad9a1c493e.zip
egit-github-e9fe86833ecc7c2f82fda1f427df3fad9a1c493e.tar.gz
egit-github-e9fe86833ecc7c2f82fda1f427df3fad9a1c493e.tar.bz2
Remove API token support which is not supported in v3refs/changes/51/3051/3
GitHub password now required for issue task repository which is supported in both v2 and v3 APIs. Change-Id: I36dac5b68d7476843b9b19351d41ad21d718e927 Signed-off-by: Kevin Sawicki <kevin@github.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubCredentials.java14
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubService.java3
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositorySettingsPage.java9
3 files changed, 10 insertions, 16 deletions
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubCredentials.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubCredentials.java
index 19cd580..ff2300b 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubCredentials.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubCredentials.java
@@ -18,12 +18,12 @@ import org.eclipse.mylyn.tasks.core.TaskRepository;
public class GitHubCredentials {
private final String username;
- private final String apiToken;
-
-
- public GitHubCredentials(String username, String apiToken) {
+ private final String password;
+
+
+ public GitHubCredentials(String username, String password) {
this.username = username;
- this.apiToken = apiToken;
+ this.password = password;
}
public GitHubCredentials(AuthenticationCredentials credentials) {
@@ -37,8 +37,8 @@ public class GitHubCredentials {
public String getUsername() {
return username;
}
- public String getApiToken() {
- return apiToken;
+ public String getPassword() {
+ return password;
}
}
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubService.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubService.java
index cf89769..5cdca30 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubService.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubService.java
@@ -73,7 +73,6 @@ public class GitHubService {
// private final static String COMMENT = "comment/";
private final static String ADD_LABEL = "label/add/"; // Implemented
private final static String REMOVE_LABEL = "label/remove/"; // Implemented
- private final static String TOKEN = "/token";
private static final String EMAILS = "emails";
@@ -96,7 +95,7 @@ public class GitHubService {
*/
public GitHubService setCredentials(GitHubCredentials credentials) {
Credentials apiCredentials = new UsernamePasswordCredentials(
- credentials.getUsername() + TOKEN, credentials.getApiToken());
+ credentials.getUsername(), credentials.getPassword());
this.httpClient.getState().setCredentials(AuthScope.ANY, apiCredentials);
return this;
}
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositorySettingsPage.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositorySettingsPage.java
index a6f5c80..39290cf 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositorySettingsPage.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositorySettingsPage.java
@@ -39,8 +39,6 @@ public class GitHubRepositorySettingsPage extends
static final String URL = "http://github.com";
- private static final String PASS_LABEL_TEXT = "GitHub API Token:";
-
/**
* Populate taskRepository with repository settings.
*
@@ -51,7 +49,7 @@ public class GitHubRepositorySettingsPage extends
super("GitHub Repository Settings", "", taskRepository);
this.setHttpAuth(false);
this.setNeedsAdvanced(false);
- this.setNeedsAnonymousLogin(false);
+ this.setNeedsAnonymousLogin(true);
this.setNeedsTimeZone(false);
this.setNeedsHttpAuth(false);
}
@@ -78,10 +76,7 @@ public class GitHubRepositorySettingsPage extends
repositoryUserNameEditor.setLabelText("GitHub " + text);
}
- // Use the password field for the API Token Key
- if (repositoryPasswordEditor != null) {
- repositoryPasswordEditor.setLabelText(PASS_LABEL_TEXT);
- }
+ this.setAnonymous(false);
}
@Override