Bluemix示例应用程序失败,"未能对马华&QUOT认证; [英] Bluemix sample app fails with "Failed to authenticate against MCA"

查看:224
本文介绍了Bluemix示例应用程序失败,"未能对马华&QUOT认证;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想生成并运行此Bluemix示例应用程序:

BMS样本:helloTodoAdvanced

我在该合同的README.md的说明逐字。具体做法是:


  1. 从GitHub的BMS-样品-hellotodo先进项目的干净的检出。


  2. 创建一个新的BluemixMobileFirst入门boilerplace应用程序。


  3. 验证从Bluemix控制台和Web UI的基本功能。


  4. 创建了一个新的Facebook应用程序ID,使用示例应用程序包和类。


  5. 配置BlueMix移动客户端访问(MCA)用我的Facebook应用程序ID。


  6. 更​​新了的NodeJS应用server.js按照项目的指示。


  7. 修饰Facebook应用程序ID,Bluemix路线和Bluemix应用GUID Android应用程序源代码。


  8. 我在Genymotion模拟器中运行:一个三星Galaxy SR / Android的API 18


  9. 下面是Android工作室的logcat从尝试运行:



04-04 17:19:58.859 1276年至1298年/ com.ibm.hellotodoadvanced E / MainActivity:无法对MCA进行身份验证:响应:{错误:unauthorized_client,ERROR_DESCRIPTION:未知客户}
04-04 17:19:58.859 1276年至1298年/ com.ibm.hellotodoadvanced E / MainActivity:无法对MCA进行身份验证,原因不明
04-04 17:19:58.863 1276年至1291年/ com.ibm.hellotodoadvanced E / mfpsdk.AuthorizationProcessManager:AuthorizationProcessManager.handleAuthorizationFailure在AuthorizationProcessManager.java:426 ::授权过程失败

<!=程序加载和运行...但身份验证失败,此错误

Q:任何建议,我怎么能调试无法对马华的身份验证的错误

问:你应该登录到Facebook直接的Andr​​oid

我的理解是否 - Bluemix直接与Facebook认证的应用程序; Android用户是无关紧要的。

问:是否有任何其他的疑难杂症的需要得到MCA认证与Bluemix工作Android版


解决方案

我认为你需要卸载从设备您的应用程序,然后重新安装它,它通常是问题未知客户的情况。


Q1:我不认为这是调试认证流程(只是普通的Andr​​oid调试器)任何特殊的方式

Q2)是的流程是:用户登录Facebook的令牌再发送到验证它和赠款马华服务器,MCA令牌可以让你得到你的受保护的资源。

Q3)你需要做的加入到Facebook的Andr​​oid应用程序的所有的指令(如果你看到Facebook的弹出,所以我觉得你这样做流量)。你可以按照此链接更多信息

I'm trying to build and run this Bluemix sample app:

BMS samples: helloTodoAdvanced

I'm following the instructions in the project's README.md verbatim. Specifically:

  1. Clean checkout of the bms-samples-hellotodo-advanced project from Github.

  2. Created a new Bluemix "MobileFirst Starter" boilerplace app.

  3. Verified the basic functionality from the Bluemix console and the Web UI.

  4. Created a new Facebook app ID, using the package and class in the sample app.

  5. Configured BlueMix Mobile Client Access (MCA) to use my Facebook App ID.

  6. Updated the NodeJS server.js app per the project instructions.

  7. Modified the Android app source with the Facebook App ID, Bluemix route and Bluemix app guid.

  8. I'm running on a Genymotion emulator: a Samsung Galaxy Sr/Android API 18

  9. Here is the Android Studio logcat from an attempted run:

04-04 17:19:58.859 1276-1298/com.ibm.hellotodoadvanced E/MainActivity: Failed to authenticate against MCA: Response: {"error":"unauthorized_client","error_description":"Unknown client"}
04-04 17:19:58.859 1276-1298/com.ibm.hellotodoadvanced E/MainActivity: Failed to authenticate against MCA, unknown reason
04-04 17:19:58.863 1276-1291/com.ibm.hellotodoadvanced E/mfpsdk.AuthorizationProcessManager: AuthorizationProcessManager.handleAuthorizationFailure in AuthorizationProcessManager.java:426 :: authorization process failed

<= The program loads and runs ... but authentication fails with this error!

Q: Any suggestions as to how I can debug the "Failed to authenticate against MCA" errors?

Q: Are you supposed to log on to Facebook directly from Android?

My understanding is "No" - Bluemix authenticates the app directly with Facebook; the Android user is irrelevant.

Q: Are there any other "gotcha's" needed to get MCA authentication working with Bluemix for Android?

解决方案

I think you need to uninstall your app from the device and then reinstall it , it usually the issue in a case of "unknown client".
Q1 : I don't think there is any special way to debug the authentication flow (just the regular android debugger )
Q2) yes the flow is: the user login to facebook the token then sent to the MCA server which validates it and grants you MCA token which will let you get to your protected resource.
Q3) You need to do all the instructions of adding facebook to an android app (if you see the facebook popup so I think you did this flow ). you can follow this link for more info

这篇关于Bluemix示例应用程序失败,&QUOT;未能对马华&QUOT认证;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆