I am using Worklight 6.2 iOS native framework. I have implemented a custom MyChallengeHandler that subclasses ChallengeHandler, and logging in:
[[WLClient sharedInstance] login:@"SomeRealm" withDelegate:LoginListener];
In ChallengeHandler I can submit success, which calls onSuccess: in LoginListener:
[self submitSuccess:response];
However, I can't submit failure, which I was expecting to call onFailure: in LoginListener. In fact, it looks like there is no effect when calling submitFailure: and onFailure: never gets called in LoginListener.
Also, I don't see a declaration of submitFailure: in WL ChallengeHandler header, it is available only in BaseChallengeHandler.
My main point is, currently it looks like the LoginListener onFailure: method is never called, but there are cases when the handleChallenge: should fail. And LoginListener should get released.
Is this a known issue in Worklight, is there any workaround?
Update 1:
Just found a similar problem for JS client API, which isn't useful for native: Adapter procedure call, reporting an authentication failure
Update 2:
This might be important. I am using Adapter authentication, but in the IBM example there is submitLoginForm:, maybe my issue is for Adapter authentication only.
[self submitAdapterAuthentication:invocationData options:nil]
ChallangeHandlerinstead ofChallengeHandler(e not a). Not sure if it's just here or in your real code too... - Nathan HhandleChallangeinstead ofhandleChallenge) - Nathan H