Skip to content

Commit d89ebee

Browse files
SNOW-2222046: Fix oauth values (#2423)
1 parent 2228456 commit d89ebee

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

DESCRIPTION.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
1313
- Disabled token caching for OAuth Client Credentials authentication
1414
- Added in-band HTTP exception telemetry.
1515
- Fixed a bug where timezoned timestamps fetched as pandas.DataFrame or pyarrow.Table would overflow for the sake of unnecessary precision. In the case where an overflow cannot be prevented a clear error will be raised now.
16+
- Fix OAuth authenticator values.
1617

1718
- v3.16.0(July 04,2025)
1819
- Bumped numpy dependency from <2.1.0 to <=2.2.4.

src/snowflake/connector/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,5 +440,5 @@ class IterUnit(Enum):
440440
)
441441

442442
_OAUTH_DEFAULT_SCOPE = "session:role:{role}"
443-
OAUTH_TYPE_AUTHORIZATION_CODE = "authorization_code"
444-
OAUTH_TYPE_CLIENT_CREDENTIALS = "client_credentials"
443+
OAUTH_TYPE_AUTHORIZATION_CODE = "oauth_authorization_code"
444+
OAUTH_TYPE_CLIENT_CREDENTIALS = "oauth_client_credentials"

test/unit/test_auth_oauth_auth_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_auth_oauth_auth_code_oauth_type(omit_oauth_urls_check):
3939
)
4040
body = {"data": {}}
4141
auth.update_body(body)
42-
assert body["data"]["OAUTH_TYPE"] == "authorization_code"
42+
assert body["data"]["OAUTH_TYPE"] == "oauth_authorization_code"
4343

4444

4545
@pytest.mark.parametrize("rtr_enabled", [True, False])

test/unit/test_oauth_token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ def test_client_creds_oauth_type():
551551
)
552552
body = {"data": {}}
553553
auth.update_body(body)
554-
assert body["data"]["OAUTH_TYPE"] == "client_credentials"
554+
assert body["data"]["OAUTH_TYPE"] == "oauth_client_credentials"
555555

556556

557557
@pytest.mark.skipolddriver

0 commit comments

Comments
 (0)