09-14-2010 01:05 PM
I am struggling for several days now to do a https connection (not a Basic Authentication!) from my Java application. I am using the 4.5.0 API and I try to access a Web Service running on one of our servers using https. I am on the Simulator (BlackBerry 8300) at the moment.
I did https "Basic Authentication" and it works great - but in the final app, "Basic Authentication" is too weak. So I am searching for a Java example how to handle a real http authentication challenge ...?
I have searched Google for several days now - but could find nothing useful? Is there a special secret to know?
I did the same app on the iPhone before and had no problem to find a good documentation on how to authenticate - and everything works instantly. This proves to me that our server is running correctly and that I "only" have to find out how to connect using the BlackBerry API....
Thanks for any help & regards,
09-14-2010 01:19 PM
welcome to the support forums.
if you use https, why don't you log in to the webservice?
blackberry also offers a multitude of encryption algorithms if you want to go this way.
09-15-2010 04:59 AM
thx for your reply! I am not shure what you mean with "Log in to the web service"?
The problem is, that our server is (and must) be secured by https (with logon) and it sends an authentication challange to the clients who want to access it. It does this before even one single http request is processed. There is no way to call any service on the server without doing an full featured https logon first.
09-15-2010 05:11 AM
as far as i understand https the client and the server create a secure connection without any user interaction (except when new certificates have to be trusted etc).
when you have an https connection you can do whatever you want. basic auth can be used safely as the connection itself is encrypted.
09-16-2010 09:16 AM - edited 09-16-2010 09:21 AM
thx for your reply. Unfortunately I can not switch to Basic Authentication on our servers. We are a large company and I can not decide the security settings on our systems.
I am still struggeling by doing more than Basic Authentication with Java2 ME and the API that are available on the BlackBerry. A simple suggestion wether Authentication using Autentication Challenges is in general possible or not on BB would be time saving and very helpful....
However, I will continue to search on Google - but the fact that Google finds near to nothing on this topic makes me believe that there is no way. I am afraid that this will kick BlackBerry out of the game.
04-07-2011 11:37 AM
I am trying to use Basic authentication and HTTPS to connect to a RESTful web service but I can't even get the connection work! I've checked the URL, the HTTP method (GET in this case), the credentials are OK and the encoding too. Could you share the code you've implemented, so I can eventually get any idea of where I am going wrong?
Thanks in advance,