Learn R Programming

nzilbb.labbcat (version 1.0-1)

labbcatCredentials: Sets the username and password that the package should use for connecting to a given LaBB-CAT server in future function calls.

Description

This step is optional, as all functions will prompt the user for the username and password if required. If the script is running in RStudio, then the RStudio password input dialog is used, hiding the credentials from view. Otherwise, the console is used, and credentials are visible.

Usage

labbcatCredentials(labbcat.url, username, password)

Arguments

labbcat.url

URL to the LaBB-CAT instance

username

The LaBB-CAT username, if it is password-protected

password

The LaBB-CAT password, if it is password-protected

Value

NULL if the username/password are correct, and a string describing the problem if a problem occurred, e.g. "Credentials rejected" if the username/password are incorrect, or a string starting "Version mismatch" if the server's version of LaBB-CAT is lower than the minimum required.

Details

The recommended approach is to *not* use labbcatCredentials, to avoid saving user credentials in script files that may eventually become visible to other. Use labbcatCredentials *only* in cases where the script execution is unsupervised.

Examples

Run this code
# NOT RUN {
## define the LaBB-CAT URL
labbcat.url <- "https://labbcat.canterbury.ac.nz/demo/"

## specify the username/password in the script
## (only use labbcatCredentials for scripts that must execute unsupervised!)
labbcatCredentials(labbcat.url, "demo", "demo")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab