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 年前246 查看次数
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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则