Skip to content

fix: remove unnecessary null check for oauth cred exchange #407

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

Merged
Merged
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
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
rather than in UTC. (#400)
- `get_content()` now includes vanity URLs in the returned data frame on Connect
v2024.06.0 and later. (#398)
- Removed unnecessary null check with default from `get_oauth_credentials()` and
`get_oauth_content_credentials()` functions for `requested_token_type` parameter
that was causing issues with Connect < 2025.03.0. (#407)

# connectapi 0.7.0

Expand Down
6 changes: 0 additions & 6 deletions R/get.R
Original file line number Diff line number Diff line change
Expand Up @@ -674,9 +674,6 @@ get_oauth_credentials <- function(
requested_token_type = NULL
) {
validate_R6_class(connect, "Connect")
if (is.null(requested_token_type)) {
requested_token_type <- "urn:ietf:params:oauth:token-type:access_token"
}
url <- v1_url("oauth", "integrations", "credentials")
body <- list(
grant_type = "urn:ietf:params:oauth:grant-type:token-exchange",
Expand Down Expand Up @@ -743,9 +740,6 @@ get_oauth_content_credentials <- function(
)
}
}
if (is.null(requested_token_type)) {
requested_token_type <- "urn:ietf:params:oauth:token-type:access_token"
}
url <- v1_url("oauth", "integrations", "credentials")
body <- list(
grant_type = "urn:ietf:params:oauth:grant-type:token-exchange",
Expand Down