Use apiTokenServiceName constant and not the string
Change-Id: If695b2476752c3beccfe0d11656d96ed1f3f7fde
diff --git a/R/KorAPConnection.R b/R/KorAPConnection.R
index 53fbc1c..cdc51f8 100644
--- a/R/KorAPConnection.R
+++ b/R/KorAPConnection.R
@@ -114,14 +114,14 @@
#' }
#'
setMethod("clearApiToken", "KorAPConnection", function(kco) {
- key_delete("RKorAPClientAPIToken", kco@KorAPUrl)
+ key_delete(apiTokenServiceName, kco@KorAPUrl)
})
#' @import keyring
getApiToken <- function(KorAPUrl) {
if ("keyring" %in% installed.packages()[,1 ]&& has_keyring_support()
- && KorAPUrl %in% key_list(service = "RKorAPClientAPIToken"))
- key_get("RKorAPClientAPIToken", KorAPUrl)
+ && KorAPUrl %in% key_list(service = apiTokenServiceName))
+ key_get(apiTokenServiceName, KorAPUrl)
else
NULL
}