Skip to content

Commit bc697d1

Browse files
fix: remove unnecessary null check for oauth cred exchange (#407)
1 parent e8c8075 commit bc697d1

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

NEWS.md

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
rather than in UTC. (#400)
1010
- `get_content()` now includes vanity URLs in the returned data frame on Connect
1111
v2024.06.0 and later. (#398)
12+
- Removed unnecessary null check with default from `get_oauth_credentials()` and
13+
`get_oauth_content_credentials()` functions for `requested_token_type` parameter
14+
that was causing issues with Connect < 2025.03.0. (#407)
1215

1316
# connectapi 0.7.0
1417

R/get.R

-6
Original file line numberDiff line numberDiff line change
@@ -674,9 +674,6 @@ get_oauth_credentials <- function(
674674
requested_token_type = NULL
675675
) {
676676
validate_R6_class(connect, "Connect")
677-
if (is.null(requested_token_type)) {
678-
requested_token_type <- "urn:ietf:params:oauth:token-type:access_token"
679-
}
680677
url <- v1_url("oauth", "integrations", "credentials")
681678
body <- list(
682679
grant_type = "urn:ietf:params:oauth:grant-type:token-exchange",
@@ -743,9 +740,6 @@ get_oauth_content_credentials <- function(
743740
)
744741
}
745742
}
746-
if (is.null(requested_token_type)) {
747-
requested_token_type <- "urn:ietf:params:oauth:token-type:access_token"
748-
}
749743
url <- v1_url("oauth", "integrations", "credentials")
750744
body <- list(
751745
grant_type = "urn:ietf:params:oauth:grant-type:token-exchange",

0 commit comments

Comments
 (0)