如何解决AWS Api 网关 lambda 授权方 401 错误
我使用这种架构:
AWS API Gateway (Lambda Authorizer) -> NLB -> Proxy (Nginx container) -> Backend container (private subnet)
当我使用有效令牌调用 API 时,我在 Cloudwatch(Nginx 容器)上收到错误:
Method response headers: {Server=Nginx/1.16.1,Date=Mon,28 Jun 2021 07:16:28 GMT,Content-Length=0,Connection=keep-alive,vary=Origin,Access-Control-Request-Method,Access-Control-Request-Headers,WWW-Authenticate=Bearer error="invalid_token",error_description="An error occurred while attempting to decode the Jwt:
Unable to resolve the Configuration with the provided Issuer of
https://olaqinb2c.b2clogin.com/[tenant-id]/null/v2.0/",error_uri="https://tools.ietf.org/html/rfc6750#section-3.1",X-Content-Type-Options=nosniff,X-XSS-Protection=1; mode=block,Cache-Control=no-cache,no-store,max-age=0,must-revalidate,Pragma=no-cache,Expires=0,x-frame-options=DENY}
在此迁移(Cognito 到 Azure AD B2C)之前,我将 Cognito 与 AWS Api Gateway 结合使用,并且运行良好。
此外,在我没有 API 网关和 Nginx 代理的本地电脑上,它工作正常。
感谢您的帮助
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。