зеркало из https://github.com/Azure/AzureRMR.git
tweak auth code
This commit is contained in:
Родитель
f428ea47fe
Коммит
3f139277bf
|
@ -70,11 +70,11 @@ process_headers <- function(token, auto_refresh)
|
||||||
token$refresh()
|
token$refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
creds <- token$credentials
|
access_token <- extract_jwt(token)
|
||||||
host <- httr::parse_url(AzureAuth::decode_jwt(creds$access_token)$payload$aud)$hostname
|
host <- httr::parse_url(decode_jwt(access_token)$payload$aud)$hostname
|
||||||
headers <- c(
|
headers <- c(
|
||||||
Host=host,
|
Host=host,
|
||||||
Authorization=paste(creds$token_type, creds$access_token),
|
Authorization=paste("Bearer", access_token),
|
||||||
`Content-Type`="application/json"
|
`Content-Type`="application/json"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче