Skip to content
This repository has been archived by the owner on Oct 31, 2019. It is now read-only.

Commit

Permalink
Merge branch '44-blob-no-authenticate' into dev
Browse files Browse the repository at this point in the history
* 44-blob-no-authenticate:
  Update tests to reflect that function output is TRUE when successful #31
  Remove redundant arguments, e.g. azToken #50
  Add validateStorageArguments() function #46
  Support downloading more than 5000 blob results, by passing maxresults as an argument #48
  Replace cat() with message() #49
  Modify tests to reflect that azureCheckToken() return logical value
  Modify azurePutBlob() to use callAzureStorageApi() and updateAzureActiveContext() #46
  Add updateAzureActiveContext() function to simplify code #46
  Only attempts to authenticate if is.activeAzureContect() is TRUE #46
  Define callAzureStorageApi() function and use in azureListStorageBlobs() #46
  Don't authenticate - workaround for testing - have to fix this!!! #44
  Allow setting azureContext = NULL to access blob storage.  Edits only to azureListStorageBlobs() and azureGetBlob() #44
  Add Visual Studio RTVS files to .gitignore
  • Loading branch information
andrie committed Feb 13, 2017
2 parents 6db4bc0 + 272a79a commit 83a0507
Show file tree
Hide file tree
Showing 23 changed files with 525 additions and 533 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.Rproj.user
.Rhistory
.RData
*.Rproj
*.rxproj
*.rxproj.user
*.suo

3 changes: 2 additions & 1 deletion R/AzureAuthenticate.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@ azureAuthenticate <- function(azureActiveContext, tenantID, clientID, authKey, v
#' @family Resources
#' @export
azureCheckToken <- function(azureActiveContext) {
if (missing(azureActiveContext) || is.null(azureActiveContext)) return(NA)
if (is.null(azureActiveContext$EXPIRY))
stop("Not Authenticated: Use azureAuthenticate")

if (azureActiveContext$EXPIRY < Sys.time()) {
message("Azure Token Expired: Attempting automatic renewal")
azureAuthenticate(azureActiveContext)
}
return("OK")
return(TRUE)
}
Loading

0 comments on commit 83a0507

Please sign in to comment.