【问题标题】:AWS Cognito and API Gateway for a RESTful API适用于 RESTful API 的 AWS Cognito 和 API Gateway
【发布时间】:2017-12-11 18:49:51
【问题描述】:

我想构建一个可供移动应用使用的 RESTful API。我们决定选择 AWS。

我想使用 API 网关实现用于登录/注册的微服务。他们是在 AWS Api Gateway 后面使用 cognito 的一种方式吗?我想创建一个 lambda 以使用 Cognito 登录用户。我想这样做来构建一个完整的 REST Api,并避免使用任何 Cognito SDK。

您能否解释一下是否可行,如果可以,有人可以告诉我如何进行吗?

【问题讨论】:

标签: rest amazon-web-services aws-api-gateway aws-cognito


【解决方案1】:

您应该能够在 API Gateway 端点后面编写一个 Lambda 函数,以使用 Cognito SDK 接收 cognito 用户凭证和authenticate。来自 cognito authenticateUser 方法的响应令牌需要发送回您的移动客户端以调用其他 API 网关端点。

【讨论】:

    猜你喜欢
    • 2017-12-30
    • 2018-12-16
    • 2022-10-01
    • 2017-05-29
    • 2020-01-05
    • 2016-08-20
    • 2022-11-15
    • 1970-01-01
    • 2017-06-27
    相关资源
    最近更新 更多