need access token as header in cognito

0

We need access token as header in cognito authorizer https://aws.amazon.com/premiumsupport/knowledge-center/api-gateway-cognito-401-unauthorized/ is the only way is to add custom scope to do it? How custom scope can be configured in sam template? "

已提問 2 年前檢視次數 266 次
1 個回答
1

If there are no scopes defined the API Gateway Cognito Authorizer will require the ID Token. If you require to use the Access Token then you will need to define one or more scopes in your Method Request OAuth scopes. These scopes will also need to be in your Access Token. Scopes can be defined with CloudFormation reference AWS::ApiGateway::Method then see AuthorizationScopes.

profile pictureAWS
Mike_P
已回答 2 年前

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

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

回答問題指南