how to authenticate/Authorize https post request with Bearer token in api gateway?

0

I have an api gateway with lambda set up , with resources/url set up. most of the examples i have seen in such REST API service set up for aws, is in the request header , client post request with "x-api-key" : somevalue, which in turn is used to authorization.

how to read a Bearer token in such scencario , or how to use bearer token and validate? do we have to write custom code to authenticate , while using bearer token? also , the set up i have in api gateway requires an api key, can i use bearer token value instead of api key or do i have to build a new service ( api gateway) to use this bearer token instead of api key?

已提問 6 個月前檢視次數 418 次
1 個回答
0

Hi,

Assuming you are using the HTTP API with a JWT Authorizer, please, take a look at this document : https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-jwt-authorizer.html

Then, go to this page to see how to write the Lambda authorizer: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-jwt-authorizer.html

Best,

Didier

profile pictureAWS
專家
已回答 6 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南