ggpanta Member Licensed User Longtime User Feb 23, 2012 #1 Is it possible to use Basic Auth with HTTPUtils?
ggpanta Member Licensed User Longtime User Feb 23, 2012 #2 Actually I am not going to use httputils since its easier to use the http library, but I have an issue with passing only a username. In my case I get a token (not OAUTH) and then I have to use the token as the username in the authentication process. In curld I would pass this curl http://domain.tld -u TOKEN: But when I set the password value of executecredentials to Null I still dont get porper auth. Any ideas?? Upvote 0
Actually I am not going to use httputils since its easier to use the http library, but I have an issue with passing only a username. In my case I get a token (not OAUTH) and then I have to use the token as the username in the authentication process. In curld I would pass this curl http://domain.tld -u TOKEN: But when I set the password value of executecredentials to Null I still dont get porper auth. Any ideas??
Erel B4X founder Staff member Licensed User Longtime User Feb 23, 2012 #3 If you like to pass credentials using HttpUtils then you can modify HttpUtilsService.ProcessNextTask and change hc.Execute to hc.ExecuteCredentials. However in your case you will need to manually implement the authentication. You should send a regular request. The server will respond with an error code of 401. You should read the response and find the token from the headers. You can then make another request with this value as the user name. Upvote 0
If you like to pass credentials using HttpUtils then you can modify HttpUtilsService.ProcessNextTask and change hc.Execute to hc.ExecuteCredentials. However in your case you will need to manually implement the authentication. You should send a regular request. The server will respond with an error code of 401. You should read the response and find the token from the headers. You can then make another request with this value as the user name.
ggpanta Member Licensed User Longtime User Feb 23, 2012 #4 I have already done that, I get the responce and send it as a username but still no go, when trying on a local nginx all seems fine, I will try and probe the other side (API devs Regards. Upvote 0
I have already done that, I get the responce and send it as a username but still no go, when trying on a local nginx all seems fine, I will try and probe the other side (API devs Regards.
ggpanta Member Licensed User Longtime User Feb 23, 2012 #5 Just an update, I have solved this by doing a simple execute and setting the Authentication header manually with the token. Upvote 0
Just an update, I have solved this by doing a simple execute and setting the Authentication header manually with the token.
R Rene Richartz New Member Licensed User Longtime User Mar 10, 2014 #6 I' running into the same issues, can you post an example how you solved it? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Mar 11, 2014 #7 This is an old thread about HttpUtils framework. You should use HttpUtils2. If you need any assistance then please start a new thread. Upvote 0
This is an old thread about HttpUtils framework. You should use HttpUtils2. If you need any assistance then please start a new thread.