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

feat(core,api): IAM auth mode for HTTP requests (REST and GQL) #1893

Merged
merged 78 commits into from
Jul 21, 2022
Merged

feat(core,api): IAM auth mode for HTTP requests (REST and GQL) #1893

merged 78 commits into from
Jul 21, 2022

Conversation

ragingsquirrel3
Copy link
Contributor

This PR does the following:

  • migrates logic for API key auth mode to auth provider, including definition in core
  • consumes IAM auth provider in API plugin for HTTP requests, the result being that REST and GraphQL queries/mutations will work with IAM auth mode. I plan to have integration tests for this in another PR.
  • unit tests for that stuff

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2022

Codecov Report

Merging #1893 (4252d70) into feat/api-next (7a82e9e) will increase coverage by 9.57%.
The diff coverage is 96.92%.

@@                Coverage Diff                @@
##           feat/api-next    #1893      +/-   ##
=================================================
+ Coverage          35.92%   45.49%   +9.57%     
=================================================
  Files                116      129      +13     
  Lines               6513     7697    +1184     
=================================================
+ Hits                2340     3502    +1162     
- Misses              4173     4195      +22     
Flag Coverage Δ
android-unit-tests ∅ <ø> (∅)
flutter-unit-tests 29.26% <96.92%> (+0.98%) ⬆️
ios-unit-tests 89.08% <ø> (+8.87%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...api/lib/src/decorators/authorize_http_request.dart 95.45% <95.45%> (ø)
...api/lib/src/amplify_authorization_rest_client.dart 62.50% <100.00%> (+62.50%) ⬆️
...kages/api/amplify_api/lib/src/api_plugin_impl.dart 88.11% <100.00%> (+11.98%) ⬆️
...ib/src/graphql/app_sync_api_key_auth_provider.dart 100.00% <100.00%> (ø)
...mple/ios/unit_tests/QueryPaginationUnitTests.swift 100.00% <0.00%> (ø)
...os/unit_tests/ModelSchemaEquatableExtensions.swift 89.83% <0.00%> (ø)
...mple/ios/unit_tests/DataStorePluginUnitTests.swift 96.81% <0.00%> (ø)
.../example/ios/unit_tests/resources/SchemaData.swift 100.00% <0.00%> (ø)
...it_tests/DataStoreHubEventStreamHandlerTests.swift 97.87% <0.00%> (ø)
...e/ios/unit_tests/AmplifyModelSchemaUnitTests.swift 97.70% <0.00%> (ø)
... and 7 more

Travis Sheppard added 2 commits July 19, 2022 13:42
@ragingsquirrel3 ragingsquirrel3 changed the title feat(core,api): IAM auth mode for HTTP requests feat(core,api): IAM auth mode for HTTP requests (REST and GQL) Jul 19, 2022
@ragingsquirrel3 ragingsquirrel3 marked this pull request as ready for review July 19, 2022 20:57
@ragingsquirrel3 ragingsquirrel3 requested a review from a team as a code owner July 19, 2022 20:57
ragingsquirrel3 and others added 2 commits July 21, 2022 11:25
…er.dart

Co-authored-by: Dillon Nys <24740863+dnys1@users.noreply.github.com>
Copy link
Contributor

@Equartey Equartey left a comment

Choose a reason for hiding this comment

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

Looks good, nice work!

@ragingsquirrel3 ragingsquirrel3 merged commit 2fb4c0c into aws-amplify:feat/api-next Jul 21, 2022
@ragingsquirrel3 ragingsquirrel3 deleted the feat/api-iam-auth-mode branch July 21, 2022 20:50
HuiSF pushed a commit to HuiSF/amplify-flutter that referenced this pull request Nov 10, 2022
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.

4 participants