зеркало из 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()
|
||||
}
|
||||
|
||||
creds <- token$credentials
|
||||
host <- httr::parse_url(AzureAuth::decode_jwt(creds$access_token)$payload$aud)$hostname
|
||||
access_token <- extract_jwt(token)
|
||||
host <- httr::parse_url(decode_jwt(access_token)$payload$aud)$hostname
|
||||
headers <- c(
|
||||
Host=host,
|
||||
Authorization=paste(creds$token_type, creds$access_token),
|
||||
Authorization=paste("Bearer", access_token),
|
||||
`Content-Type`="application/json"
|
||||
)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче