以前在IBM MobileFirst 7.1中,我们可以使用authenticationConfig.xml中的自定义安全检查来更新或调整直接更新预定义身份验证领域和质询处理程序。对于mobileFirst 8.0应用程序,我们如何使用直接更新预定义身份验证领域进行自定义安全检查?
目前,我们正在使用自定义质询处理程序和安全检查开发应用程序。因此,当我们更新服务器上的Web资源时,它会触发客户端设备上的直接更新,并更新Web资源并重新加载应用程序。此处,Web资源按预期更新。重新加载应用程序后,它试图获取访问令牌并且无法从服务器获取令牌。
日志:
04-25 17:10:02.822 7414-8743/com.abc D/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader: WLDirectUpdateDownloader.extractZipFile in WLDirectUpdateDownloader.java:320 :: File: views
04-25 17:10:02.825 7414-8743/com.abc D/com.worklight.androidgap.directupdate.WLDirectUpdateDownloader: WLDirectUpdateDownloader.extractZipFile in WLDirectUpdateDownloader.java:353 :: Finish copy files to local storage from updated zip file...
04-25 17:10:04.088 7414-8847/com.abc W/PluginManager: THREAD WARNING: exec() call to WLDirectUpdatePlugin.hideProgressDialog blocked the main thread for 1064ms. Plugin should use CordovaInterface.getThreadPool().
04-25 17:10:04.088 7414-8847/com.abc I/Choreographer: Skipped 63 frames! The application may be doing too much work on its main thread.
04-25 17:10:04.095 7414-8743/com.abc D/com.worklight.androidgap.plugin.ChallengeHandlerPlugin: ChallengeHandlerPlugin.execute in ChallengeHandlerPlugin.java:42 :: inside ChallengeHandlerPlugin execute for action cancel
04-25 17:10:04.096 7414-8743/com.abc D/com.worklight.androidgap.plugin.ChallengeHandlerPlugin: ChallengeHandlerPlugin.execute in ChallengeHandlerPlugin.java:64 :: inside ChallengeHandlerPlugin cancel
04-25 17:10:04.096 7414-8743/com.abc D/wl.resource_request: WLResourceRequest$ObtainAccessTokenListener.onFailure in WLResourceRequest.java:759 :: Resource request failed with status:-1 and error: Challenge handler operation was cancelled.
04-25 17:10:04.099 7414-8743/com.abc D/com.worklight.androidgap.plugin.WLResourceRequestPlugin: WLResourceRequestPlugin$1$1.onFailure in WLResourceRequestPlugin.java:92 :: inside WLResourceRequestPlugin failure
04-25 17:10:04.102 7414-8743/com.abc D/WLAuthorizationManagerInternal: WLAuthorizationManagerInternal.onObtainAccessTokenFailure in WLAuthorizationManagerInternal.java:904 :: Obtain AccessToken failed with status code: -1 and error message: Challenge handler operation was cancelled.
04-25 17:10:04.109 7414-8743/com.abc D/com.worklight.androidgap.plugin.WLActionSenderPlugin: WLActionSenderPlugin.onDestroy in WLActionSenderPlugin.java:114 :: onDestroy
04-25 17:10:04.112 7414-8743/com.abc D/com.worklight.androidgap.plugin.WLActionSenderPlugin: WLActionSenderPlugin.removeActionReceiverIfExists in WLActionSenderPlugin.java:96 :: Receiver :: MIActionReceiverId found. Removing.
04-25 17:10:04.113 7414-8743/com.abc D/com.worklight.androidgap.plugin.WLActionReceiverWithCallbackcontext: WLActionReceiverWithCallbackcontext.releaseCallbackContext in WLActionReceiverWithCallbackcontext.java:50 :: releaseCallbackContext
04-25 17:10:04.206 7414-7414/com.abc I/chromium: [INFO:CONSOLE(142)] "onFailure for fetch tasks adapter call. error:{"status":-1,"responseText":"","responseHeaders":{},"errorMsg":"Challenge handler operation was cancelled.","errorCode":"CHALLENGE_HANDLING_CANCELED"}", source: file:///android_asset/www/js/controllers/myTasks.js (142)
答案 0 :(得分:0)
您所指的内容将在此处记录
此处突出显示8.0中的直接更新生命周期
这是否符合您的要求。如果没有,您可以通过示例
提供更多信息答案 1 :(得分:0)
在MobileFirst 7.1中,安全领域在authenticationConfig.xml中定义。 MobileFirst 8.0将替换为adapter.xml中定义的安全检查。请参阅以下链接,其中详细介绍了安全领域向MFP 8的迁移。 https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/upgrading/migrating-security/#migrating-the-resource-adapter