【问题标题】:HTTP API Gateway JWT Authorizer to take identity source from cookieHTTP API Gateway JWT Authorizer 从 cookie 获取身份源
【发布时间】:2020-07-06 17:34:35
【问题描述】:

我正在使用带有 JWT Authorizer 的 HTTP API 网关。我已经让它与请求一起将 JWT 放在 Authorization 标头中。但是,由于要求,我需要能够将 JWT 放在 Cookie 标头中。我无法让 API 网关在 Cookie 标头中选择特定的 cookie。我尝试了以下身份源表达式:

  1. $request.header.Cookie.[myCookieName]
  2. $request.header.Cookie.myCookieName

它们都不起作用,我不确定还能做什么。 API网关的HTTP API版本是否支持这个?如果有,有什么建议吗?

替代解决方案是使用带有自定义授权器 lambda 的 REST 版本,但我不想走那条路,因为这里没有提到另一个问题。

【问题讨论】:

    标签: cookies jwt authorization aws-api-gateway


    【解决方案1】:

    目前无法访问 cookie。

    这样的功能请求has been posted on AWS Forums and is in the backlog

    【讨论】:

      猜你喜欢
      • 2020-05-01
      • 2020-07-11
      • 2021-11-20
      • 2021-09-05
      • 2020-03-27
      • 1970-01-01
      • 2018-12-24
      • 2020-03-17
      • 1970-01-01
      相关资源
      最近更新 更多