0
votes

I'm trying to login in a native iOS app to Worklight 6.1 server and I'm not able to find anything that can help, I read the documentation about authenticators, challenges and challenge handlers, but when I try the challenge handler is always called event if the resource (procedure) is not protected with security test.

I have the following questions:

  1. How can I handle user login? I read in the javascript code in a hybrid app that is integrated with the same server and found a login function in WLClient which I can't find in the native app SDK.
  2. How can I get the logged in user data and how can I check if the user logged in or not?
  3. what is "wl_unprotected" securityTest? is it the same as not assigning a security test to the procedure or not?

Please help because I'm not able to understand this complicated authentication mechanism in anyway.

Thanks in advance.

1

1 Answers

0
votes

Why read the JavaScript tutorial? Read the training materials for Native iOS. They clearly demonstrate this.

The following is for MobileFirst Platform 7.0, but it's the same for 6.1:

Start here: https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-0/authentication-security/

Select either form-based, adapter-based or customer (which ever you're using), and then look at the client-side tutorial. There is even a sample application implemented in Swift.