发出AWS移动集线器登录 - 标识池的NotAuthorizedException

时间:2017-10-22 09:01:15

标签: android amazon-web-services aws-cognito federated-identity aws-mobilehub

我指的是AWS Mobile Hub开发人员指南(用于集成基于电子邮件的用户登录)http://docs.aws.amazon.com/mobile-hub/latest/developerguide/amhd-dg.pdf

标题为:为AWS Mobile服务设置您的应用程序(Android - Java)

最后一步没有8结果应该是“IdentityManager:获得用户ID:us-east-1:abcabcabc-0be6-444e-b101-abcabcabc” 但我得到“D / IdentityManager:得到用户ID:null”

异常的堆栈跟踪:

E/IdentityManager: Unauthenticated access is not supported for this identity pool. (Service: AmazonCognitoIdentity; Status Code: 400; Error Code: NotAuthorizedException; Request ID: d275fc19-b700-11e7-bac5-5d9ca7c93439)
                                                                                   com.amazonaws.services.cognitoidentity.model.NotAuthorizedException: Unauthenticated access is not supported for this identity pool. (Service: AmazonCognitoIdentity; Status Code: 400; Error Code: NotAuthorizedException; Request ID: d275fc19-b700-11e7-bac5-5d9ca7c93439)
                                                                                       at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:729)
                                                                                       at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:405)
                                                                                       at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:212)
                                                                                       at com.amazonaws.services.cognitoidentity.AmazonCognitoIdentityClient.invoke(AmazonCognitoIdentityClient.java:559)
                                                                                       at com.amazonaws.services.cognitoidentity.AmazonCognitoIdentityClient.getId(AmazonCognitoIdentityClient.java:445)
                                                                                       at com.amazonaws.auth.AWSAbstractCognitoIdentityProvider.getIdentityId(AWSAbstractCognitoIdentityProvider.java:172)
                                                                                       at com.amazonaws.auth.CognitoCredentialsProvider.getIdentityId(CognitoCredentialsProvider.java:402)
                                                                                       at com.amazonaws.auth.CognitoCachingCredentialsProvider.getIdentityId(CognitoCachingCredentialsProvider.java:465)
                                                                                       at com.amazonaws.mobile.auth.core.IdentityManager$1.run(IdentityManager.java:334)
                                                                                       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
                                                                                       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                                       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                                                                                       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                                                                                       at java.lang.Thread.run(Thread.java:841)


------------------------

D/IdentityManager: Got user ID: null

0 个答案:

没有答案