AWSのAPIゲートウェイ
AWS APIゲートウェイを安全にするために、AWS認知を構成しましょう.


プールが作成された後、セットアップに戻って、アプリケーションクライアントを作成

アプリケーションクライアントの設定を更新

Authページをホストするためにドメインを加えます

“アプリのクライアントの設定”と“ホストUIを起動”に戻ってください.

ここでAPIを確保するには、AWS APIゲートウェイの設定の中で

今、そのメソッドの“メソッド要求”を更新することによってAPIエンドポイントを確保してください.

APIを再配備し、エンドポイントをテストします.これで、次のレスポンスを得る
セキュアエンドポイントにアクセスするには、「認証」ヘッダーにアクセストークンを提供する必要があります
オープンAWS認知

デフォルトのユーザープールを作成する

プールが作成された後、セットアップに戻って、アプリケーションクライアントを作成

アプリケーションクライアントの設定を更新

Authページをホストするためにドメインを加えます

“アプリのクライアントの設定”と“ホストUIを起動”に戻ってください.

ここでAPIを確保するには、AWS APIゲートウェイの設定の中で

今、そのメソッドの“メソッド要求”を更新することによってAPIエンドポイントを確保してください.

APIを再配備し、エンドポイントをテストします.これで、次のレスポンスを得る
{"message":"Unauthorized"}
トークンを手に入れましょう.認識しているログインのトークンを返すために認知サービスをしたいので、「CONFITO HOSTUDUI signinページに戻って、「コード」質問文字列paramを「トークン」に変えることによって、トークンを要求してください.https://app2.auth.eu-west-1.amazoncognito.com/login?client_id=xxxxxxxxxxxx&response_type=token.....
IDRAYトークンとAccessRankトークンの成功したサインはURLで返されます.AccessRankトークンを取得します.セキュアエンドポイントにアクセスするには、「認証」ヘッダーにアクセストークンを提供する必要があります
GET https://xxxxxxxx.execute-api.af-south-1.amazonaws.com/dev
Authorization: vLnNpZ25pbi51c2Vy...
レスポンスを得る{"message":"Welcome to My Secure API"}
完了!Reference
この問題について(AWSのAPIゲートウェイ), 我々は、より多くの情報をここで見つけました https://dev.to/paulallies/aws-cognito-and-aws-api-gateway-3j8hテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol