Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): create RequestDecorator in interceptor #1623

Merged
merged 1 commit into from
Jan 14, 2022

Conversation

eeatonaws
Copy link
Contributor

Issue #, if available: #1606

Description of changes: When configuring the AWSApiPlugin for REST with AMAZON_COGNITO_USER_POOLS as the authorization type, configuration fails due to trying to fetch auth tokens when creating the RequestDecorator. This PR moves the creation of the RequestDecorator inside the interceptor so the auth tokens aren't retrieved when configuring the AWSApiPlugin.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@eeatonaws eeatonaws requested a review from a team January 6, 2022 21:02
Copy link
Contributor

@sdhuka sdhuka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were you able to test the change? my concern is that fetchAuth can still fail when the call is intercepted.

@eeatonaws
Copy link
Contributor Author

With the change, I am able to successfully configure the AWSApiPlugin and make API calls (post, get, etc.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants