access AWS API gateway using access token from identityserver

别来无恙 提交于 2019-12-11 07:05:07

问题


We have our identity server implemented using identity server

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

And user will authenticate and get the access token from the identity server. We have some APIs developed in AWS api gateway. Just wondering what is the common practice to implement the authentication / authorization in the aws api gateway. We would prefer to use the existing access token from the identity server in the API gateway.


回答1:


You will need to configure a custom authorizer on your API Gateway. The Custom Authorizer will use a Lambda Function to validate the Access Token. You will need to configure the Lambda Function to validate accordingly to your token. Here are some resources to help you configure the API Gateway Custom Authorizer with Lambda Function:

  • Use API Gateway Lambda Authorizers
  • Custom Authorizers in API Gateway and Lambda


来源:https://stackoverflow.com/questions/52386062/access-aws-api-gateway-using-access-token-from-identityserver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!