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.

Aucune réponse

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions