Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,8 @@ def account_identifier(self) -> str:

return account_identifier

def get_oauth_token(self, conn_config: dict | None = None) -> str:
def get_oauth_token(self, conn_config: dict) -> str:
"""Generate temporary OAuth access token using refresh token in connection details."""
if conn_config is None:
conn_config = self._get_conn_params

url = f"{self.account_identifier}.snowflakecomputing.com/oauth/token-request"

data = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,13 @@ def get_headers(self) -> dict[str, Any]:
def get_oauth_token(self, conn_config: dict[str, Any] | None = None) -> str:
"""Generate temporary OAuth access token using refresh token in connection details."""
warnings.warn(
"This method is deprecated. Please use `get_oauth_token` method from `SnowflakeHook` instead. ",
"This method is deprecated. Please use `get_oauth_token` method from `SnowflakeHook` instead.",
AirflowProviderDeprecationWarning,
stacklevel=2,
)
if conn_config is None:
conn_config = self._get_conn_params

return super().get_oauth_token(conn_config=conn_config)

def get_request_url_header_params(self, query_id: str) -> tuple[dict[str, Any], dict[str, Any], str]:
Expand Down
Loading