Worklight 6.1在iOS Swift本机应用程序中处理用户登录

时间:2020-12-08 22:11:17

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.

我正在尝试使用原生iOS应用程序登录Worklight 6.1服务器而我无法找到任何可以提供帮助的内容,我阅读了有关身份验证器,挑战和挑战处理程序的文档,但是当我尝试挑战处理程序时总是被调用如果资源(过程)未受安全测试保护,则为event。

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. 我该如何处理用户登录?我在混合应用程序中读取了javascript代码,该应用程序与同一服务器集成,并在WLClient中找到了我在本机应用程序SDK中找不到的登录功能。
  3. How can I get the logged in user data and how can I check if the user logged in or not?
  4. 如何获取登录的用户数据以及如何检查用户是否登录?
  5. what is "wl_unprotected" securityTest? is it the same as not assigning a security test to the procedure or not?
  6. 什么是“wl_unprotected”securityTest?是否与不为程序分配安全测试相同?

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

请帮助,因为无论如何我无法理解这种复杂的认证机制。

Thanks in advance.

提前致谢。

1 个解决方案

#1


0  

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

为什么要阅读JavaScript教程?阅读Native iOS的培训材料。他们清楚地证明这一点

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

以下内容适用于MobileFirst Platform 7.0,但6.1版本相同:

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

从这里开始: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.

选择基于表单,基于适配器或客户(您曾经使用过),然后查看客户端教程。甚至还有一个在Swift中实现的示例应用程序。

#1


0  

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

为什么要阅读JavaScript教程?阅读Native iOS的培训材料。他们清楚地证明这一点

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

以下内容适用于MobileFirst Platform 7.0,但6.1版本相同:

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

从这里开始: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.

选择基于表单,基于适配器或客户(您曾经使用过),然后查看客户端教程。甚至还有一个在Swift中实现的示例应用程序。