зеркало из https://github.com/Azure/AzureKusto.git
change default from device_code to authorization_code
This commit is contained in:
Родитель
ff95072b47
Коммит
b2f84831f4
2
NEWS.md
2
NEWS.md
|
@ -4,6 +4,8 @@
|
|||
* `server` argument of `kusto_database_endpoint` can be just cluster name and no
|
||||
longer needs to be the fully qualified URI. E.g. can pass either
|
||||
`server = "help"` or `server = "https://help.kusto.windows.net"`
|
||||
* Changed default `get_kusto_token()` auth_type from "device_code" to
|
||||
"authorization_code" for easier to use sign-in flow.
|
||||
* Added `$` as an infix operator in a KQL expression now translates to `.` to
|
||||
enable nested dynamic field access.
|
||||
* Added `slice_sample` dplyr verb
|
||||
|
|
|
@ -189,7 +189,7 @@ find_endpoint_token <- function(properties, .query_token)
|
|||
{
|
||||
message("No app ID supplied; using KustoClient app")
|
||||
properties$appclientid <- .kusto_app_id
|
||||
auth_type <- "device_code"
|
||||
auth_type <- "authorization_code"
|
||||
}
|
||||
else auth_type <- NULL # KustoClient needs devicecode, otherwise let get_azure_token choose
|
||||
|
||||
|
|
|
@ -55,9 +55,10 @@ get_kusto_token <- function(server=NULL, clustername, location=NULL, tenant=NULL
|
|||
if(version == 2 && httr::parse_url(server)$path == "")
|
||||
server <- c(paste0(sub("/$", "", server), "/.default"), "offline_access", "openid")
|
||||
|
||||
# KustoClient requires devicecode auth if username not supplied
|
||||
# Used to default to "device_code" but "authorization_code" has better ease of use
|
||||
# and also works with .kusto_app_id without supplying a username.
|
||||
if(is.null(auth_type) && app == .kusto_app_id && (!"username" %in% names(list(...))))
|
||||
auth_type <- "device_code"
|
||||
auth_type <- "authorization_code"
|
||||
|
||||
AzureAuth::get_azure_token(server, tenant, app, auth_type=auth_type, version=version, ...)
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче