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.

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠