diff --git a/DESCRIPTION b/DESCRIPTION index 0eddc19..f79eefc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: sbtools Title: USGS ScienceBase Tools Maintainer: Luke Winslow -Version: 0.14.3 +Version: 0.14.4 Authors@R: c(person("Luke", "Winslow", role = c("aut","cre"), email = "lwinslow@usgs.gov"), person("Scott", "Chamberlain", role = c("aut"), diff --git a/R/current_session.R b/R/current_session.R index 23be870..cc79272 100644 --- a/R/current_session.R +++ b/R/current_session.R @@ -2,7 +2,8 @@ #' #'@description #'Returns the currently cached SB session. If there -#'is no authenticated session, returns NULL. +#'is no authenticated session, returns NULL. Emits a +#'warning if the session has expired. #' #'@author Luke Winslow #' @@ -12,6 +13,8 @@ #' #'@export current_session = function(){ - + if(session_expired(pkg.env$session)){ + warning('SB authentication expired, SB interaction may fail. Please re-authenticate using authenticate_sb().') + } return(pkg.env$session) } \ No newline at end of file diff --git a/man/current_session.Rd b/man/current_session.Rd index 7762de0..11f4dbb 100644 --- a/man/current_session.Rd +++ b/man/current_session.Rd @@ -8,7 +8,8 @@ current_session() } \description{ Returns the currently cached SB session. If there -is no authenticated session, returns NULL. +is no authenticated session, returns NULL. Emits a +warning if the session has expired. } \examples{