Learn R Programming

micar (version 1.2.0)

mica.login: Open connection with Mica

Description

Open a connection with Mica and returns a Mica object. When the two-factor authentication mechanism is enabled, the user will be prompt for one-time password input.

Usage

mica.login(
  username = getOption("mica.username", "anonymous"),
  password = getOption("mica.password", "password"),
  url = getOption("mica.url"),
  opts = getOption("mica.opts", list())
)

Value

A Mica object.

Arguments

username

User name in mica. Can be provided by "mica.username" option.

password

User password in mica. Can be provided by "mica.password" option.

url

Mica url or list of mica urls. Can be provided by "mica.url" option. Secure http (https) connection is required.

opts

Curl options. Can be provided by "mica.opts" option.

Examples

Run this code
if (FALSE) {
# login using credentials from mica.username and mica.password options
m <- mica.login("https://mica-demo.obiba.org")
# login by providing credentials
m <- mica.login("administrator", "password", "https://mica-demo.obiba.org")
}

Run the code above in your browser using DataLab