使用来自 IdentityServer 的访问令牌访问 AWS API 网关

2023-12-20

我们使用身份服务器实现了身份服务器

https://github.com/IdentityServer/IdentityServer3 https://github.com/IdentityServer/IdentityServer3 or https://github.com/IdentityServer/IdentityServer4 https://github.com/IdentityServer/IdentityServer4

用户将从身份服务器进行身份验证并获取访问令牌。我们在AWS api gateway中开发了一些API。只是想知道在 aws api 网关中实现身份验证/授权的常见做法是什么。我们更愿意使用 API 网关中身份服务器的现有访问令牌。


您将需要配置一个custom authorizer在您的 API 网关上。自定义授权方将使用 Lambda 函数来验证访问令牌。您需要配置 Lambda 函数以根据您的令牌进行验证。以下是一些可帮助您使用 Lambda 函数配置 API Gateway 自定义授权方的资源:

  • 使用 API Gateway Lambda 授权者 https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-use-lambda-authorizer.html
  • API Gateway 和 Lambda 中的自定义授权方 https://aws.amazon.com/blogs/compute/introducing-custom-authorizers-in-amazon-api-gateway/
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用来自 IdentityServer 的访问令牌访问 AWS API 网关 的相关文章

随机推荐