View source: R/r6_DBConnection_v9.R
| csdb_set_auth_hook | R Documentation |
Register a function to be called when a database connection fails. This is useful for refreshing Kerberos tickets or other authentication credentials before retrying the connection.
csdb_set_auth_hook(hook)
hook |
A function with no arguments that performs authentication, or NULL to clear the hook. |
Invisibly returns the previous hook (if any).
## Not run:
# Set an auth hook to refresh Kerberos credentials
csdb_set_auth_hook(function() {
system2("/bin/authenticate.sh", stdout = NULL)
})
# Clear the hook
csdb_set_auth_hook(NULL)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.