How do I do OAuth authentication through DWA in C# .NET ?
Louis MADEUF (43●2●6●11)
| asked Jun 20 '12, 5:32 a.m.
edited Jul 03 '12, 9:18 a.m. by Geoffrey Clemm (30.1k●3●30●35)
Hello,
I'm having trouble with the OAuth authentication. I am working on the development of a tool working with DOORS and to access the data from DOORS database I need to authenticate through DWA using OAuth. So I wrote my own OAuth-REST authentication routine in C# .NET but I seem to get an http 401 error when I try to authorize my request token in certain cases. Here is what happens :
---> Though, I was able to authenticate properly via OAuth IF a DWA session was opened before at http://localhost:8080/dwa/welcome/welcome.jsp But I feel like this is not the proper way OAuth should work. Its purpose it to make the user authenticate during the OAuth routine running in the background. And this is what the page at https://localhost:8443/dwa/oauth/oauth_login.jsp has been made for : it is its only purpose as its URL seems to suggest. What am I doing wrong ? What did I not understand ? I used RestSharp to develop my small client (http://restsharp.org/) but this problem seems DWA related. In paralel, does anyone knows how to get a hold of the OAuth verifier in my client ? I can only do that manually... Thank you very much in advance, Louis |
One answer
Hello everyone,
I have made some progress on the subject and all this is no longer an issue. I am now using DOORS 9.4 + DWA 1.5 and the OAuth authentication seems more stable and runs the version 1.0 and 1.0a, since v2.0 is still on a draft state (Source from IBM). Regarding my problems, if you encounter the same or similar ones, here are some tips you should check : have you set a valid callback_url ? look at the OAuth specification on : http://oauth.net/ If you did not set it properly, you will not be redirected. If it was absent, you will not be authenticated because it is required in the first request. The OAuth login page of DWA works fine and even says if you put in bad credentials. If you put the right ones it will redirect you. RestSharp is very useful and simple library for writing your own custom REST-OAuth client, I recommend it strongly. you can find it here : http://restsharp.org/ I hope this will help some of you ! This issue is now closed. Comments
Jose Miguel Ordax Cassa
commented Nov 23 '12, 8:32 a.m.
Hi Louis, I am having problems when doing the authorization of the token.
1
Jose Miguel Ordax Cassa
commented Nov 24 '12, 3:08 p.m.
Solved. Commented at: https://jazz.net/forum/questions/94750/oauth-access-programatically-to-doorsdwa
|
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.