Skip to content

Commit

Permalink
Update DBH_token.R
Browse files Browse the repository at this point in the history
Hent token for hvert enkelt spørring
  • Loading branch information
mni-hkdir committed Nov 8, 2023
1 parent 20a3bfa commit 31b3153
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions R/DBH_token.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

0 comments on commit 31b3153

Please sign in to comment.