Worklight 6.0 application using SSL

非 Y 不嫁゛ 提交于 2019-12-11 14:19:18

问题


Worklight 6.0.0, targeting iPad.

I have a simple demonstration application, no authentication at present. I am demonstrating use of reverse proxy. So I am building my application using the Build for Remote Server workaround and can see in xcode the correct server specification. I have some adapter calls, but for a particular demo scenario I also want to make an explicit call to

WL.Client.connect( ... );

If I use an http connection I see a request like this:

http://192.168.0.19/MyApp/apps/services/api/Work01/ipad/init

and it works just fine. If instead I use an SSL connection, as expected I see this

https://192.168.0.19:443/Infrabel01/apps/services/api/Work01/ipad/init

And I get the following error.

> [ERROR   ] FWLSE0059E: Login into realm 'NullLoginModule' failed. The
> environment 'ipad' supports multiple versions, therefore you must
> request it with a version parameter.. [project Infrabel01] The
> environment 'ipad' supports multiple versions, therefore you must
> request it with a version parameter. [ERROR   ] 
> FWLSE0117E: Error code: 4, error description: AUTHENTICATION_ERROR, 
> error message: An Error occurred while performing authentication using loginModule
> NullLoginModule, User Identity Not available. [project Infrabel01]
> [project Infrabel01]

That "request it with a version parameter" is intriguing. Is there some extra parameter I need to pass? Or is the overall implication that connecting over SSL requires authentication?


回答1:


I had the same problem.

I have solved it by using the real IP address of the server in the WL app instead of using localhost:

  1. When the emulator is running your app, press the Menu button.
  2. Select to change your server URL
  3. Remove "localhost" and use the IP address.
  4. Accept and try again.

This fixed my problem.




回答2:


Please make sure your Worklight server or proxy server is enabled SSL with certificate which signed by a trust public CA like Verisign. Worklight not support private CA certificate.



来源:https://stackoverflow.com/questions/18589894/worklight-6-0-application-using-ssl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!