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? "

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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ