Skip to content

fix(auth): Prevent auth calls from processing until configured or errored #2402

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

Merged
merged 4 commits into from
Apr 20, 2023

Conversation

tylerjroach
Copy link
Member

@tylerjroach tylerjroach commented Apr 19, 2023

  • PR title and description conform to Pull Request guidelines.

Issue #, if available:
#2341

Description of changes:

How did you test these changes?
(Please add a line here how the changes were tested)

Documentation update required?

  • No
  • Yes (Please include a PR link for the documentation update)

General Checklist

  • Added Unit Tests
  • Added Integration Tests
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)

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

@tylerjroach tylerjroach requested a review from a team as a code owner April 19, 2023 16:29
gpanshu
gpanshu previously approved these changes Apr 19, 2023
mattcreaser
mattcreaser previously approved these changes Apr 19, 2023
@mattcreaser mattcreaser added this pull request to the merge queue Apr 19, 2023
@mattcreaser mattcreaser removed this pull request from the merge queue due to the queue being cleared Apr 19, 2023
@tylerjroach tylerjroach dismissed stale reviews from gpanshu and mattcreaser via 7e19267 April 19, 2023 20:26
@@ -197,6 +197,22 @@ internal class RealAWSCognitoAuthPlugin(
}
}

internal suspend fun suspendWhileConfiguring() {
return suspendCoroutine { continuation ->
Copy link
Contributor

@div5yesh div5yesh Apr 20, 2023

Choose a reason for hiding this comment

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

Do we still need the latch in initialize() above?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I wanted to keep that to still throw on an auth plugin configuration error. These checks have different purposes.

@tylerjroach tylerjroach enabled auto-merge (squash) April 20, 2023 13:14
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