To implement a new keyring backend, you need to inherit from this
class and then redefine the get, set, set_with_value and delete
methods. Implementing the list method is optional. Additional methods
can be defined as well.
Details
These are the semantics of the various methods:
get(service, username = NULL, keyring = NULL)
get_raw(service, username = NULL, keyring = NULL)
set(service, username = NULL, keyring = NULL, prompt = "Password: ")
set_with_value(service, username = NULL, password = NULL,
keyring = NULL)
set_with_raw_value(service, username = NULL, password = NULL,
keyring = NULL)
delete(service, username = NULL, keyring = NULL)
list(service = NULL, keyring = NULL)
list_raw(service = NULL, keyring = NULL)What these functions do:
get()queries the secret in a keyring item.get_raw()is similar toget(), but returns the result as a raw vector.set()sets the secret in a keyring item. The secret itself is read in interactively from the keyboard.set_with_value()sets the secret in a keyring item to the specified value.set_with_raw_value()sets the secret in keyring item to the byte sequence of a raw vector.delete()remotes a keyring item.list()lists keyring items.list_raw()lists keyring items, also as raw vectors.
The arguments:
serviceString, the name of a service. This is used to find the secret later.usernameString, the username associated with a secret. It can beNULL, if no username belongs to the secret. It uses the value of thekeyring_username, if set.keyringString, the name of the keyring to work with. This only makes sense if the platform supports multiple keyrings.NULLselects the default (and maybe only) keyring.passwordThe value of the secret, typically a password, or other credential.promptString, the text to be displayed above the textbox.
See also
Other keyring backend base classes:
backend_keyrings