问题
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?
回答1:
You can write challenge handlers in native by following the Worklight iOS native APIs (http://ibm.co/1fDoDJh - see page 28 "ChallengeHandler").
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...
来源:https://stackoverflow.com/questions/20757179/ibm-worklight-6-1-is-it-possible-to-create-a-challenge-handler-in-native-class