Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylar-dev] Authentication problems

Hi Klaas,

Try the following instead:

RepositoryTaskData task = BugzillaServerFacade.getBug(repositoryUrl, userName, password, proxySettings, characterEncoding, id);

Then you can do stuff like:

System.out.println(task.getAssignedTo());
System.out.println(task.getDescription());
System.out.println(task.getLabel());
System.out.println(task.getLastModified());
System.out.println(task.getRepositoryKind());
...etc...

In my quick little test, the characterEncoding and proxySettings can be null.

Your plugin will need to depend on org.eclipse.mylar.bugzilla.core AND org.eclipse.mylar.tasks.core

Also FYI, AbstractRepositoryConnector (and the corresponding BugzillaRepositoryConnector) will be refactored into the headless core when Mik gets back. [https://bugs.eclipse.org/bugs/show_bug.cgi?id=150290]

Hope this helps,
Nathan

P.S.: I'll add this information to: http://wiki.eclipse.org/index.php/Mylar_Integrator_Reference

Klaas_Bals@xxxxxxxxxxxxxxxxxxxxxx wrote:

I'm trying to use the bugzilla classes to access a bugzilla repository. I've sucessfully ran the BugzillaQueryTest.

Now I'm trying to access our own bugzilla, using a username and password. To access the repository, I have the following lines of code:

fRepository=*new* TaskRepository(BugzillaCorePlugin.REPOSITORY_KIND, repositoryURL, IBugzillaConstants.BugzillaServerVersion.SERVER_218.toString()); fRepository.setAuthenticationCredentials(username, password);
                System.out.println(fRepository.getUserName());
                System.out.println(fRepository.getPassword());

As output, I get 'null' twice, which means that the authentication information is not set. If I trace down to TaskRepository.setAuthenticationCredentials into getAuthInfo(), I find that Platform.getAuthorizationInfo() always returns null.

If I continue, and do try to run a search, I get the resulting status message: Status ERROR: org.eclipse.mylar.bugzilla.ui code=4 Login error occurred while querying Bugzilla Server http://bugs.intranet. Ensure proper configuration in Task Repositories View. _javax.security.auth.login.LoginException_: Invalid Username Or Password children=[Status ERROR: org.eclipse.mylar.bugzilla.ui code=4 class _javax.security.auth.login.LoginException_: _javax.security.auth.login.LoginException_: Invalid Username Or Password Status ERROR: org.eclipse.mylar.bugzilla.ui code=0 search failed _javax.security.auth.login.LoginException_: Invalid Username Or Password]

Any thoughts?

Thanks!
-----
Klaas Bals  -  CTO
Inventive Designers
Direct Phone: +32 - 3 - 8210183
Office Phone: +32 - 3 - 8210170
Office Fax: +32 - 3 - 8210171
Email: Klaas_Bals@xxxxxxxxxxxxxxxxxxxxxx
http://www.inventivedesigners.com

Inventive Designers - Keep your options open...


------------------------------------------------------------------------

Inventive Designers' Email Disclaimer:
http://www.inventivedesigners.com/email-disclaimer



------------------------------------------------------------------------

_______________________________________________
mylar-dev mailing list
mylar-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylar-dev


Back to the top