login_bms: Login to the server

View source: R/qbms.R

login_bmsR Documentation

Login to the server

Description

Connect to the server. If username or password parameters are missing, then a login window will pop-up to insert username and password.

All other connection parameters (i.e. server IP or domain, connection port, API path, and connection protocol e.g. http://) will retrieve from the qbms_config list.

This function will update both of the qbms_config list (brapi connection object in the con key) and qbms_state list (token value in the token key).

Usage

login_bms(username = NULL, password = NULL, encoding = "json")

Arguments

username

the username (optional, default is NULL)

password

the password (optional, default is NULL)

encoding

how should the named list body be encoded? Can be one of form (application/x-www-form-urlencoded), multipart, (multipart/form-data), or json (application/json).

Value

no return value

Author(s)

Khaled Al-Shamaa, k.el-shamaa@cgiar.org

Examples

if(interactive()) {
# config your BMS connection
set_qbms_config("https://bmsdev-brapi.ibp.services/ibpworkbench")

# login using your BMS account (interactive mode)
# you can pass BMS username and password as parameters (batch mode)
login_bms()
}

khaled-alshamaa/QBMS documentation built on Jan. 27, 2024, 6:40 a.m.