From 31b31532eb64de0a5b59a0d077c95693f52bc8fb Mon Sep 17 00:00:00 2001 From: Marija Ninic <57001187+makinin@users.noreply.github.com> Date: Wed, 8 Nov 2023 10:15:34 +0100 Subject: [PATCH] Update DBH_token.R MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hent token for hvert enkelt spørring --- R/DBH_token.R | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/R/DBH_token.R b/R/DBH_token.R index d03b90f..8fd6566 100644 --- a/R/DBH_token.R +++ b/R/DBH_token.R @@ -46,12 +46,8 @@ if (identical(sso_id, "") | identical(sso_secret, "")) { return("") } else { - t <- Sys.time() - if (t >= .env$token_expiration) { - .env$token <- .get_new_token(sso_id, - sso_secret) - .env$token_expiration <- t + 3600 - } - return(.env$token) + + return(.get_new_token(sso_id, sso_secret)) } } +