Query and manipulate the Windows Credential Store
windows_item_*
functions read, write, delete and list
credentials.
windows_item_types() windows_item( credential_blob, target_name, type = "generic", comment = NULL, persist = c("local_machine", "session", "enterprise"), attributes = list(), target_alias = NULL, username = NULL ) windows_item_read(target_name, type = "generic") windows_item_write(item, preserve = FALSE) windows_item_delete(target_name, type = "generic") windows_item_enumerate(filter = NULL, all = FALSE)
credential_blob |
The secret credential, a password,
certificate or key. See also
https://docs.microsoft.com/en-us/windows/win32/api/wincred/ns-wincred-credentialw
This can be a raw vector, or a string. If it is a string, then it
will be converted to Unicode, without the terminating zero.
It can also be |
target_name |
The name of the credential. The |
type |
The type of the credential. This member cannot be
changed after the credential is created. See |
comment |
If not |
persist |
Defines the persistence of this credential.
|
attributes |
Application-defined attributes that are
associated with the credential. This is |
target_alias |
Alias for the |
username |
|
item |
|
preserve |
The credential BLOB from an existing credential
is preserved with the same credential name and credential type.
The |
filter |
If not |
all |
Whether to use the |
windows_item_types()
windows_item_types()
lists the currently supported credential
types.
windows_item_types()
## [1] "generic" "domain_password" ## [3] "domain_certificate" "domain_visible_password"
windows_item()
windows_item()
creates a Windows credential, that can be
then added to the credential store.
it <- windows_item("secret", "my-host-password") it
## <oskeyring_windows_item: generic> ## target_name: my-host-password ## persist: local_machine ## credential_blob: <-- hidden -->
windows_item_write()
Writes an item to the credential store.
windows_item_write(it)
windows_item_read()
Reads a credential with the specified type and target_name
.
windows_item_read("my-host-password")
## <oskeyring_windows_item: generic> ## target_name: my-host-password ## persist: local_machine ## credential_blob: <-- hidden -->
windows_item_enumerate()
List all credentials that match a prefix.
windows_item_enumerate(filter = "my-*")
## [[1]] ## <oskeyring_windows_item: generic> ## target_name: my-host-password ## persist: local_machine ## credential_blob: <-- hidden -->
windows_item_delete()
Delete a credential:
windows_item_delete("my-host-password") windows_item_enumerate(filter = "my-*")
## list()
windows_item_types()
returns a character vector, the
currently supported credential types.
windows_item()
returns an oskeyring_windows_item
object.
windows_item_read()
returns an oskeyring_windows_item
object.
windows_item_write()
returns NULL
, invisibly.
windows_item_delete()
returns NULL
, invisibly.
windows_item_enumerate()
returns a list of
oskeyring_windows_item
items.
The API documentation at https://docs.microsoft.com/en-us/windows/win32/api/wincred/
# See above
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.