Description Arguments Value Methods Examples
etcd authentication - auth control
auth_user, auth_pwd |
(character) Username and password for the authenticated user, the root user |
... |
Further args passed on to |
see return for each method
auth_status: get authentication status, returns single boolean,
TRUE
indicates authentication enabled, and FALSE
authentication disabled
auth_enable: enable authentication, returns single boolean,
TRUE
indicates authentication enable request worked
auth_disable: disable authentication, returns single boolean,
TRUE
indicates authentication disable request worked
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ## Not run:
# make a client
cli <- etcd()
# check authentication status
cli$auth_status()
# enable authentication
cli$auth_enable("root", "pickbetterpwd")
# woops, if you got error about root user, craeate one first
cli$user_add(user = "root", password = "pickbetterpwd")
# disable authentication
cli$auth_disable("root", "pickbetterpwd")
# check again, now disabled
cli$auth_status()
# Users
# Add user
cli$user_add("jane", "janepwd", "root", "pickbetterpwd")
# List users
cli$user_list()
# Get a single user
cli$user_get("root")
cli$user_get("jane")
# Delete user
cli$user_delete("jane", "root", "pickbetterpwd")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.