This commit is contained in:
Hong Ooi 2019-10-16 06:40:46 +11:00
Родитель 992afce570
Коммит a3866a7031
1 изменённых файлов: 1 добавлений и 3 удалений

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

@ -108,10 +108,8 @@ build_request_body <- function(db, qry_cmd, query_options=list(), query_paramete
build_auth_str <- function(token=NULL, user=NULL, password=NULL)
{
token <- validate_token(token)
auth_str <- if(!is.null(token))
paste("Bearer", token)
paste("Bearer", validate_token(token))
else if(!is.null(user) && !is.null(password))
paste("Basic", openssl::base64_encode(paste(user, password, sep=":")))
else stop("Must provide authentication details")