当前位置: 动力学知识库 > 问答 > 编程问答 >

amazon web services - Example for using developers authentication(aws cognito) for android app

问题描述:

I have been struggling to understand how AWS Cognito should be implemented in java for android App user Authentication. I have seen Github codes for android but code is difficult for me to understand as I am beginner to android. Can anybody explain it with simple code? Specially how the user calls backendserver in java to get the ID.Any Simple explaination?

网友答案:

The basic idea is that you will have an authentication server (backend) which will be the sole authority to verify user credentials. The high level flow will be:

  1. The end user will provide credentials(username and password) on your Android App.
  2. Android App will call your backend to verify the credentials.
  3. Backend will call GetOpenIdTokenForDeveloperIdentity API of Amazon Cognito for that end-user (using the username)
  4. Cognito will return an identityId associated with that username and a OpenId Connect Token to your backend and it will passed back to the Android App.
  5. Cognito SDK will use this token to call Amazon STS to get AWS credentials for the end user.

I would highly encourage you to follow our blog post and the developer guide, it explains this flow in depth. As always, if you have any questions please feel free to ask.

Thanks.

分享给朋友:
您可能感兴趣的文章:
随机阅读: