有点多个问题,但是,Amazon Cognito AuthFlow
如何在.NET中使用Amazon Cognito用户池执行身份验证。 我发起验证下列要求:
var response1 = client.InitiateAuth(new InitiateAuthRequest()
{
AuthFlow = AuthFlowType.USER_SRP_AUTH,
AuthParameters = new Dictionary<string, string>()
{
{"USERNAME","User" },
{"SRP_A" , A }
},
ClientId = "xxxxxxxxxxxxxxxxxxxxxxxxxxx"
});
他们的文档是真的,真的坏了,我似乎无法找到什么传递时,我想应对挑战。
client.RespondToAuthChallenge(new RespondToAuthChallengeRequest()
{
ChallengeName = ChallengeNameType.PASSWORD_VERIFIER,
ChallengeResponses = { /*WHAT am I supposed to add here, and where can I find any documnetation on what is expected?*/ },
Session = response1.Session,
ClientId = "xxxxxxxxxxxxx"
});
在一个侧面说明,我想用Cognito联合身份以保护自定义.NET API,所以我的想法是使用令牌返回由Cognito作为JWT传递到的WebAPI的一面,我在那里然后将解码并验证令牌。这是使用Amazon Cognito的预期方式吗? (至少现在我不想使用亚马逊API网关)。
我假设它只是配置默认的JWT中间件的OWIN,或者我应该预期别的吗?
你侧面说明基本上是正确的:用户池给你非常相似的JWT令牌作为谷歌等......,并以同样的方式被身份池使用。 –
关于SRP [这是一种标准算法](https://en.wikipedia.org/wiki/Secure_Remote_Password_protocol),但我还没有用C#与Cognito合作。 –