Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

user authentication in rest api2.0

Hi,

in this article https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2 there are examples for basic and form based authentication using curl. Is there anyway to do the authentication in url?
for example, instead of curl:
curl -k -u myusername:mypassword "https://localhost:9443/oslc/workitems/1.json"

calling url:
https://localhost:9443/oslc/workitems/1.json?user=myusername&pass=mypassword

Thanks,
Julia

0 votes



3 answers

Permanent link
in this article
https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2
there are examples for basic and form based authentication using
curl. Is there anyway to do the authentication in url?
for example, instead of curl:
curl -k -u myusername:mypassword
"https://localhost:9443/oslc/workitems/1.json"

calling url:
https://localhost:9443/oslc/workitems/1.json?user=myusername&pass=mypassword

You could try this:

https://user:password@localhost:9443/oslc/workitems/1.json


--
Regards,
Patrick
Jazz Work Item Team

0 votes


Permanent link
Hi Patrick,

it doesnt work.
I'm getting an error message "windows cannot find 'https://user:password@localhost:9443/oslc/workitems/1.json'. Check the spelling and try again.".

Are you sure it is the correct format?

Julia.

0 votes


Permanent link
I'm getting an error message "windows cannot find
'https://user:password@localhost:9443/oslc/workitems/1.json'. Check
the spelling and try again.".

Are you sure it is the correct format?

It would be the general format to include the user credentials in a URL,
but I haven't tried myself.
Authentication is handled by the web container, not by the RTC rest
implementation.

If you are trying this using a browser (as the error message suggests),
you don't need to include the credentials explicitly. Just use
https://localhost:9443/jazz/oslc/workitems/1.json

and you will be prompted for username/password.

--
Regards,
Patrick
Jazz Work Item Team

0 votes

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,944

Question asked: Oct 01 '09, 3:10 a.m.

Question was seen: 6,520 times

Last updated: Oct 01 '09, 3:10 a.m.

Confirmation Cancel Confirm