This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This allows you to set up a local listener that deals with the OAuth2 authorization callback.
This will be used to verify the existence of a link between the GCP project and the namespace.
Behaviour of ValidateGCPServiceAccountEmail was changed to only accept user-managed service accounts and ProjectIDFromGCPEmail did not yet have a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've asked a few questions in separate comments. Except from some small changes that might follow from that or some changes that might follow from my server-side review, I think this is good to go.
However, if we're including this, I think this code would benefit from some extra godoc. This will make it easier to be used and maintain.
By also return the required link type, the function can be more generally used to check the required preconditions.
florisvdg
reviewed
Jun 25, 2020
No longer mixing different channels, which made it very unclear what happened. By buffering the channels and doing best-effort sending to these channels, we prevent goroutines infinitely hanging on sending on a channel. It is possible that a channel ends up with an unread message after WaitForAuthorizationCode has returned, but that will be cleaned up by the GC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet!
Only thing left is deciding whether or not to already return an iterator.
The somewhat complex system of having a callback function is needed to be able to pass any server errors while creating the link to the user in the redirect.
It's not yet ready for public use.
It's unused.
This to avoid confusion with the RedirectURL used in the OAuth spec.
SimonBarendse
approved these changes
Jul 3, 2020
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.