我一直在为Android(http://wso2.com/library/articles/2014/07/sso-for-native-mobile-applications-with-wso2-identity-server/)测试WSO2 Identity Server IDP代理。我设法设置IDP代理应用程序并测试没有问题。但是,当我设置了给定的示例应用程序(azone和eBuy)时,我遇到了一些错误,当我登录这些示例应用程序时,我无法理解为什么令牌返回NULL。以下是错误日志:
09-10 11:04:55.020:D / dalvikvm(19024):GC_FOR_ALLOC获得83K,12% 免费9589K / 10856K,暂停22ms,总计22ms 09-10 11:04:55.020: I / dalvikvm-heap(19024):将堆(frag case)增长到11.990MB for 1544896字节分配09-10 11:04:55.045:D / dalvikvm(19024): GC_FOR_ALLOC释放<1K,11%免费11098K / 12368K,暂停23ms,总计 23ms 09-10 11:04:55.195:D / dalvikvm(19024):GC_FOR_ALLOC释放2K,10% 免费12516K / 13788K,暂停15ms,总计15ms 09-10 11:04:55.310: D / libEGL(19024):已加载/system/lib/egl/libEGL_mali.so 09-10 11:04:55.315:D / libEGL(19024):已加载 /system/lib/egl/libGLESv1_CM_mali.so 09-10 11:04:55.320: D / libEGL(19024):已加载/system/lib/egl/libGLESv2_mali.so 09-10 11:04:55.325:E /(19024):Device driver API match 09-10 11:04:55.325: E /(19024):设备驱动程序API版本:23 09-10 11:04:55.325: E /(19024):用户空间API版本:23 09-10 11:04:55.325:E /(19024): mali:REVISION = Linux-r3p2-01rel3 BUILD_DATE = Wed 10月9日21:05:57 KST 2013 09-10 11:04:55.395:D / OpenGLRenderer(19024):启用调试模式 0 09-10 11:05:09.585:D / IdentityProxyActivity(19024):启动IDP 代理应用程序09-10 11:05:10.220:W / IInputConnectionWrapper(19024): showStatusIcon在非活动的InputConnection 09-10 11:05:21.770: D / IdentityProxyActivity(19024):启动IdentityProxyActivity onActivityResult 09-10 11:05:21.775:D / AccessTokenHandler(19024): d3b276fc3665350818f18f521f7ae4 09-10 11:05:21.790: D / ServerUtilities(19024):发布'{grant_type = authorization_code, redirect_uri = http://wso2.com,scope = openid, 代码= d3b276fc3665350818f18f521f7ae4}'到 https://172.18.64.178:9443/oauth2/token 09-10 11:05:21.795: D / ServerUtilities(19024):发布 'grant_type = authorization_code&amp; redirect_uri = http://wso2.com&scope=openid&code=d3b276fc3665350818f18f521f7ae4'to https://172.18.64.178:9443/oauth2/token 09-10 11:05:22.150: D / AccessTokenHandler(19024):{“error”:“内部服务器 错误“,”error_description“:”内部服务器错误“} 09-10 11:05:22.150:D / AccessTokenHandler(19024):内部服务器错误09-10 11:05:22.150:D / AccessTokenHandler(19024):内部服务器错误09-10 11:05:22.150:D / AndroidRuntime(19024):关闭VM 09-10 11:05:22.150:W / dalvikvm(19024):threadid = 1:线程退出 未捕获的异常(组= 0x41c38700)09-10 11:05:22.155: E / AndroidRuntime(19024):致命异常:主09-10 11:05:22.155: E / AndroidRuntime(19024):java.lang.NullPointerException 09-10 11:05:22.155:E / AndroidRuntime(19024):at org.wso2.mobile.idp.proxy.IdentityProxy.receiveAccessToken(IdentityProxy.java:60) 09-10 11:05:22.155:E / AndroidRuntime(19024):at org.wso2.mobile.idp.proxy.handlers.AccessTokenHandler $ NetworkCallTask.onPostExecute(AccessTokenHandler.java:132) 09-10 11:05:22.155:E / AndroidRuntime(19024):at org.wso2.mobile.idp.proxy.handlers.AccessTokenHandler $ NetworkCallTask.onPostExecute(AccessTokenHandler.java:65) 09-10 11:05:22.155:E / AndroidRuntime(19024):at android.os.AsyncTask.finish(AsyncTask.java:631)09-10 11:05:22.155: E / AndroidRuntime(19024):at android.os.AsyncTask.access $ 600(AsyncTask.java:177)09-10 11:05:22.155:E / AndroidRuntime(19024):at android.os.AsyncTask $ InternalHandler.handleMessage(AsyncTask.java:644) 09-10 11:05:22.155:E / AndroidRuntime(19024):at android.os.Handler.dispatchMessage(Handler.java:99)09-10 11:05:22.155:E / AndroidRuntime(19024):at android.os.Looper.loop(Looper.java:176)09-10 11:05:22.155: E / AndroidRuntime(19024):at android.app.ActivityThread.main(ActivityThread.java:5419)09-10 11:05:22.155:E / AndroidRuntime(19024):at java.lang.reflect.Method.invokeNative(Native Method)09-10 11:05:22.155:E / AndroidRuntime(19024):at java.lang.reflect.Method.invoke(Method.java:525)09-10 11:05:22.155: E / AndroidRuntime(19024):at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:1046) 09-10 11:05:22.155:E / AndroidRuntime(19024):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)09-10 11:05:22.155:E / AndroidRuntime(19024):at dalvik.system.NativeStart.main(原生方法)
此外,在测试sdample应用程序(eBuy)时,除了Logcat中的上述错误显示外,Identity Server中没有错误显示wso2carbon.log。
答案 0 :(得分:1)
答案 1 :(得分:0)
您是否在OauthCostants.java
中为客户端ID设置了正确的值在分析您的日志时,我看到您已成功完成授权代码授权类型的第一步,并且由于某种原因,第二步(令牌请求)失败。