-
Notifications
You must be signed in to change notification settings - Fork 486
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
SNOW-1917265: Add OAUTH_TYPE for authorization flow #2174
base: mkeller/SNOW-1825621/oauth-code-flow-support
Are you sure you want to change the base?
SNOW-1917265: Add OAUTH_TYPE for authorization flow #2174
Conversation
Co-authored-by: Michał Hofman <[email protected]>
@@ -436,3 +436,4 @@ class IterUnit(Enum): | |||
) | |||
|
|||
_OAUTH_DEFAULT_SCOPE = "session:role:{role}" | |||
_OAUTH_TYPE_AUTHORIZATION_CODE = "authorization_code" |
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.
In general a single leading underscore by conventions means 'internal' or 'protected', so we shouldn't use it here as we import it in another module
@@ -19,3 +19,4 @@ def test_auth_oauth(): | |||
auth.update_body(body) | |||
assert body["data"]["TOKEN"] == token, body | |||
assert body["data"]["AUTHENTICATOR"] == "OAUTH", body | |||
assert body["data"]["OAUTH_TYPE"] == "authorization_code", body |
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.
This test is for the existing OAuth implementation, i.e. for authentication with a pre-obtained access token
f4827ef
to
a850492
Compare
Please answer these questions before submitting your pull requests. Thanks!
What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-1917265
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Add login body parameter with the type of OAuth used.
(Optional) PR for stored-proc connector: