This commit is contained in:
Hong Ooi 2019-09-08 11:08:36 +10:00
Родитель c3ae93308e
Коммит f9ad31838c
3 изменённых файлов: 8 добавлений и 7 удалений

Просмотреть файл

@ -1,6 +1,7 @@
# AzureAuth 1.2.1
* Pass the resource and scope as explicit parameters to the AAD endpoint when refreshing a token. Among other things, this allows using a refresh token from one resource to obtain an access token for another resource.
* Use `utils::askYesNo` for prompts, eg when creating the AzureR caching directory and deleting tokens; this fixes a bug in reading the input. As a side-effect, Windows users who are using RGUI.exe will see a popup dialog box instead of a message in the terminal.
# AzureAuth 1.2.0

Просмотреть файл

@ -15,11 +15,11 @@ make_AzureR_dir <- function()
AzureR_dir <- AzureR_dir()
if(!dir.exists(AzureR_dir) && interactive())
{
yn <- readline(paste0(
ok <- askYesNo(paste0(
"The AzureR packages can save your authentication credentials in the directory:\n\n",
AzureR_dir, "\n\n",
"This saves you having to re-authenticate with Azure in future sessions. Create this directory? (Y/n) "))
if(tolower(substr(yn, 1, 1)) == "n")
"This saves you having to re-authenticate with Azure in future sessions. Create this directory?"))
if(!isTRUE(ok))
return(invisible(NULL))
dir.create(AzureR_dir, recursive=TRUE)

Просмотреть файл

@ -256,8 +256,8 @@ delete_azure_token <- function(resource, tenant, app, password=NULL, username=NU
if(confirm && interactive())
{
yn <- readline(paste0("Do you really want to delete this Azure Active Directory token? (y/N) "))
if(tolower(substr(yn, 1, 1)) != "y")
ok <- askYesNo("Do you really want to delete this Azure Active Directory token?", FALSE)
if(!isTRUE(ok))
return(invisible(NULL))
}
file.remove(file.path(AzureR_dir(), hash))
@ -274,8 +274,8 @@ clean_token_directory <- function(confirm=TRUE)
if(confirm && interactive())
{
yn <- readline(paste0("Do you really want to delete ALL saved Azure Active Directory tokens? (y/N) "))
if(tolower(substr(yn, 1, 1)) != "y")
ok <- askYesNo("Do you really want to delete ALL saved Azure Active Directory tokens?", FALSE)
if(!isTRUE(ok))
return(invisible(NULL))
}
toks <- dir(AzureR_dir(), pattern="^[0-9a-f]{32}$", full.names=TRUE)