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
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
3 answers
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
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