如何在 Postman 中为 Api Gateway 设置标头通过 Cognito 进行身份验证?中为、身份验证、如何在、Postman

由网友(久念成瘾)分享简介:我使用 AWS 身份池和 Facebook 提供商来验证客户端.我需要使用 Api Gateway 调用 AWS Lambda.从 Cognito 使用 Facebook 令牌,我收到了凭据:AccessKeyId、SecretKey 和 SessionToken.I use AWS Identity Pool wi...

我使用 AWS 身份池和 Facebook 提供商来验证客户端.我需要使用 Api Gateway 调用 AWS Lambda.从 Cognito 使用 Facebook 令牌,我收到了凭据:AccessKeyId、SecretKey 和 SessionToken.

I use AWS Identity Pool with Facebook provider to authenticate client. I need to invoke AWS Lambda using Api Gateway. From Cognito, using Facebook token, i received credentials: AccessKeyId, SecretKey and SessionToken.

使用此凭据,我应该如何设置标头请求来调用我的 Lambda?

Using this credentials, how should I setup header request to invoke my Lambda?

Api 网关设置(测试调用我的 lambda)

Api Gateway setup (test calls my lambda)

我尝试调用我的api,它返回请求中包含的安全令牌无效."

I try to call my api, it returns "The security token included in the request is invalid."

谢谢!

推荐答案

您必须在 Postman 中手动设置 'x-amz-security-token' 并在该标头中传递令牌.

You have to manually set 'x-amz-security-token' in Postman and pass the token in that header.

阅读全文

相关推荐

最新文章