IBM Worklight 6.1 - 是否可以在本机类而不是JavaScript中创建挑战处理程序? [英] IBM Worklight 6.1 - Is it possible to create a Challenge Handler in native class instead of JavaScript?

查看:125
本文介绍了IBM Worklight 6.1 - 是否可以在本机类而不是JavaScript中创建挑战处理程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用worklight 6.1中的Native页面编写混合应用程序,用于 ios

We are writing a Hybrid application mixed with Native pages in worklight 6.1 for ios.

我们现在正在适配器端实现安全功能,我已经从基于适配器的身份验证

We are now implementing security features on adapter-side and I have read the documentation for it from Adapter Based Authentication.

我的问题是我们的登录模块是在完全本机页面中实现的,我想在那里实现挑战处理程序。如何实现?

My problem is that our login module is implemented in a fully native page and I would like to also implement the challenge handler over there. How can this be achieved?

推荐答案

您可以通过遵循Worklight iOS本机API( http://ibm.co/1fDoDJh - 请参阅第28页ChallengeHandler。

You can write challenge handlers in native by following the Worklight iOS native APIs (http://ibm.co/1fDoDJh - see page 28 "ChallengeHandler").

需要注意的一件重要事情是,在撰写本文时,如果您计划在本机代码和混合代码之间共享会话,则必须从混合端(而不是本机端)启动服务器会话。例如,您可以在显示本机页面之前使用connectOnStartup或在javascript中手动连接。

One important thing to note is that at the time of this writing, if you plan to share a session between native and hybrid code, you MUST start the server session from the Hybrid side (and not the native side). You could for example use connectOnStartup or manually connect in javascript before you display your native pages.

在以后的版本中,这应该是双向的...

In future versions this should work both ways...

这篇关于IBM Worklight 6.1 - 是否可以在本机类而不是JavaScript中创建挑战处理程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆