login {EDIutils}R Documentation

Login to the EDI repository

Description

Login to the EDI repository

Usage

login(userId = NULL, userPass = NULL, config = NULL)

Arguments

userId

(character) User identifier of an EDI data repository account. If using

userPass

(character) Password of userId

config

(character) Path to config.txt, which contains userId and userPass (see details below)

Details

If userId, userPass, and config are NULL, the console will prompt for credentials.

config: Supplying credentials in a file named config.txt facilitates authentication within automated/unassisted processes. Contents of this file should be new line separated and have the form "<argument> = <value>" (e.g. userId = myname).

Value

(character) A temporary (~10 hour) authentication token written to the system variable "EDI_TOKEN".

Note

Only works when authenticating with EDI credentials. Does not work when authenticating with ORCiD, GitHub, or Google credentials.

Be careful not to accidentally share your userId and userPass. Some tips to avoid this:

If you may have shared your credentials, please reset your password at https://dashboard.edirepository.org/dashboard/auth/reset_password_init.

See Also

Other Authentication: logout()

Examples

## Not run: 

# Interactively at the console
login()
#> User name: "my_name"
#> User password: "my_secret"

# Programmatically with function arguments
login(userId = "my_name", userPass = "my_secret")

# Programmatically with a file containing userId and userPass arguments
login(config = paste0(tempdir(), "/config.txt"))

## End(Not run)


[Package EDIutils version 1.0.3 Index]