Repository navigation
TDL-27031: Add oauth option for authorization - #79
Merged
Merged
Conversation
prijendev
marked this pull request as ready for review
February 17, 2025 06:35
RushiT0122
requested changes
Feb 20, 2025
RushiT0122
reviewed
Feb 20, 2025
RushiT0122
reviewed
Feb 20, 2025
Comment on lines
+99
to
+102
| if self.auth_type == "Basic": | ||
| self.access_token = None | ||
| else: | ||
| self.access_token = get_access_token(self.username, self.password, URLS[(self.sandbox, self.european)]) |
Contributor
There was a problem hiding this comment.
Suggested change
| if self.auth_type == "Basic": | |
| self.access_token = None | |
| else: | |
| self.access_token = get_access_token(self.username, self.password, URLS[(self.sandbox, self.european)]) | |
| if self.auth_type == "Basic": | |
| self.access_token = None | |
| elif self.auth_type == "OAuth": | |
| self.access_token = get_access_token(self.username, self.password, URLS[(self.sandbox, self.european)]) | |
| else: | |
| raise Exception("...") |
Contributor
Author
There was a problem hiding this comment.
I think, this is not require as we are already checking any extra values over here
Contributor
There was a problem hiding this comment.
I think we should have auth_type validation in the constructor as well to make it more fail safe in case we don't invoke it from here.
Contributor
Author
There was a problem hiding this comment.
Got it. Add validation in constructor as well
RushiT0122
approved these changes
Feb 24, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of change
Manual QA steps
Risks
Rollback steps
AI generated code
https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code