How can we inject the claims through the custom authorization lambda?

0

Previously we used the authorizer type as cognitouserpool so when we send a request to the customAuthorization added API endpoint means in that API event we get the requestContext object inside authorizer object inside claims so based on that we made our applications by using inside cliams there are some user related info like "cognito:username" this is the existing process. Now I am preparing one custom authorization lambda for my nodejs API's there I want to send claims also to the respective request event i'm getting only requestContext object inside authorizer object im getting the info what i'm sending in the custom authorization lambda I want to inject the claims object also in the custom authorization.

In my custom authorization lambda Im doing first verifying the token by using with these packages 'jsonwebtoken','jwk-to-pem', after we are trying to do generate policy function inside we are sending some required info like "Action","Effect","resource" and with these "context" obj inside what we want to pass required info that use for every lambda event like username, user role etc with this approach we are able to hit the appropriate lambda but I want to inject the claims object also that should come for what API we are hitting in that API event we supposed to get the requestContext object inside authorizer object inside claims as like we are getting previously with the authorizer type of cognitouerpool related event like i want.

답변 없음

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

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

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

관련 콘텐츠