how can we set dynamically message for api gateway responses for 401 statuscode through custom authorizer lambda

0

I'm implementing the custom authorizer lambda for that I have some specific requirement that is as cognito user pool authorizer how it will send when the token has expired with 401 statuscode and 'Unauthorized' message in the same way I am trying to do through the custom authorizer lambda but it is not working properly. Im able to do with policy document with 'effect: Deny' in the context we can send the message that we want we can access that also but in the 401 case why it is not possible? Can we modify the API Gateway responses as we want the statusCode and body? why because I'm able to get the expired token case also I'm getting 401 by modifying in the gateway response statuscode.

沒有答案

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

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

回答問題指南