After initializing a different keyring with a few values, it appears that if I put in NULL or "" in for the username in key_get(), then I will get the password back for the first individual I put it. Is this on purpose?
Demo code:
library(keyring)
keyring_list() # should just see default/login keyring
keyring_create("shiny-keyring")
key_set_with_value("test-service", "Ben", password = "Banana",
keyring = "shiny-keyring")
key_set_with_value("test-service", "Nic", password = "Apple",
keyring = "shiny-keyring")
key_list(keyring = "shiny-keyring") # should see my username
key_get("test-service", "Ben",keyring = "shiny-keyring") # should show my password
key_get("test-service", NULL, keyring = "shiny-keyring") # awkward
key_get("test-service", "", keyring = "shiny-keyring") # awkward
on my machine, both of the last 2 lines return "Banana".
After initializing a different keyring with a few values, it appears that if I put in
NULL
or""
in for theusername
inkey_get()
, then I will get the password back for the first individual I put it. Is this on purpose?Demo code:
on my machine, both of the last 2 lines return "Banana".