Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 121363 Details for
Bug 208839
prompt for Bugzilla authentication credentials as needed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
patch208839.txt (text/plain), 3.71 KB, created by
Frank Becker
on 2008-12-30 15:15:48 EST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Frank Becker
Created:
2008-12-30 15:15:48 EST
Size:
3.71 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.bugzilla.core >Index: src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java,v >retrieving revision 1.165 >diff -u -r1.165 BugzillaClient.java >--- src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java 16 Dec 2008 18:08:26 -0000 1.165 >+++ src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java 30 Dec 2008 20:10:26 -0000 >@@ -148,10 +148,6 @@ > > protected Proxy proxy = Proxy.NO_PROXY; > >- protected String username; >- >- protected String password; >- > protected URL repositoryUrl; > > protected String characterEncoding; >@@ -174,11 +170,6 @@ > > public BugzillaClient(AbstractWebLocation location, String characterEncoding, Map<String, String> configParameters, > BugzillaLanguageSettings languageSettings) throws MalformedURLException { >- AuthenticationCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY); >- if (credentials != null) { >- this.username = credentials.getUserName(); >- this.password = credentials.getPassword(); >- } > this.repositoryUrl = new URL(location.getUrl()); > this.location = location; > this.characterEncoding = characterEncoding; >@@ -202,7 +193,8 @@ > } > > protected boolean hasAuthenticationCredentials() { >- return username != null && username.length() > 0; >+ AuthenticationCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY); >+ return (credentials != null && credentials.getUserName().length() > 0); > } > > private GzipGetMethod getConnect(String serverURL, IProgressMonitor monitor) throws IOException, CoreException { >@@ -349,8 +341,15 @@ > hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor); > > NameValuePair[] formData = new NameValuePair[2]; >- formData[0] = new NameValuePair(IBugzillaConstants.POST_INPUT_BUGZILLA_LOGIN, username); >- formData[1] = new NameValuePair(IBugzillaConstants.POST_INPUT_BUGZILLA_PASSWORD, password); >+ AuthenticationCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY); >+ if (credentials == null) { >+ authenticated = false; >+ throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, >+ RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(), >+ "Authentication credentials from location missing.")); //$NON-NLS-1$ >+ } >+ formData[0] = new NameValuePair(IBugzillaConstants.POST_INPUT_BUGZILLA_LOGIN, credentials.getUserName()); >+ formData[1] = new NameValuePair(IBugzillaConstants.POST_INPUT_BUGZILLA_PASSWORD, credentials.getPassword()); > > postMethod = new GzipPostMethod(WebUtil.getRequestPath(repositoryUrl.toString() > + IBugzillaConstants.URL_POST_LOGIN), true); >@@ -665,6 +664,17 @@ > postMethod.getParams().setBooleanParameter(HttpMethodParams.USE_EXPECT_CONTINUE, true); > List<PartBase> parts = new ArrayList<PartBase>(); > parts.add(new StringPart(IBugzillaConstants.POST_INPUT_ACTION, VALUE_ACTION_INSERT, characterEncoding)); >+ AuthenticationCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY); >+ String username; >+ String password; >+ if (credentials != null) { >+ username = credentials.getUserName(); >+ password = credentials.getPassword(); >+ } else { >+ username = null; >+ password = null; >+ >+ } > if (username != null && password != null) { > parts.add(new StringPart(IBugzillaConstants.POST_INPUT_BUGZILLA_LOGIN, username, characterEncoding)); > parts.add(new StringPart(IBugzillaConstants.POST_INPUT_BUGZILLA_PASSWORD, password, characterEncoding));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 208839
: 121363 |
121364