REST: Authenticating
I'm having trouble using the REST web service because I don't know how to get programmatic authentication working.
Right now, I'm trying to post data to the authentication service but I'm doing something wrong. String.Format("https://jazzserver:9443/jazz/secure/web/console/j_security_check?j_username={0}&j_password={1}", username, password); That's what I've been trying, but the response is always an authentication failed error. How do you authenticate against Jazz? |
15 answers
Rob, try checking "Disable HTML in this post" next time. Note that Preview loses this setting, unfortunately.
|
The additional step required if using Tomcat are documented here under "Configuring the authentication method":
http://jazz.net/library/techtip/75 -Rob Was there anything else you needed to do other than commenting out the form based config and uncommenting: |
Hello all,
I've been trying to use a Java HttpClient to authenticate with my RTC server, and didn't manage do to so. I tried it using Form and Basic authentication. I tried to follow this example: http://jazz.net/forums/viewtopic.php?p=13797#13797 (of course, transforming to Java) Does anyone have a snippet that shows in Java how to use the HttpClient to do the same as this example (in curl) posted in the documentation of the "Resource Oriented Work Item API v2" ? COOKIES=./cookies.txt USER=username PASSWORD=password HOST="https://localhost:9443/jazz" curl -k -c $COOKIES "$HOST/authenticated/identity" curl -k -L -b $COOKIES -c $COOKIES -d j_username=$USER -d j_password=$PASSWORD "$HOST/authenticated/j_security_check" # If this line returns the JSON representation of work item 1, authentication was successful #curl -k -b $COOKIES "$HOST/oslc/workitems/1.json" Many Thanks! Leila Naslavsky |
It's really complex to programmatic login, but I found a useful class you may refer to.
com.ibm.team.jfs.app.oauth.client.OAuthConsumerClientHelper Hello all, |
I am also having the same problem in RTC v3.0.2.2. using FORM based authentication. I would even be willing to change to BASIC authentication if I knew how to set this in RTC for Tomcat.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.