How it works...

In this recipe, we created an API gateway API and an authorizer of the type COGNITO_USER_POOLS, and integrated them together. The API gateway API CLI commands and the CloudFormation templates are similar to the ones that we discussed in Chapter 2, Building Serverless REST APIs with API Gateway; hence, we won't get into the related theory and concepts.

In addition to Integrating Cognito with API Gateway, we demonstrated the use of context.authorizer.claims, in order to retrieve additional user information from the ID token. The attributes that are used with claims need to be passed to the initiate auth API call that generates the ID token.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.47.208