brapi_bms_login: post /token

View source: R/brapi_bms_login.R

brapi_bms_loginR Documentation

post /token

Description

Login into a BrAPI compatible database.

Usage

brapi_bms_login(con = NULL)

Arguments

con

list; required: TRUE; BrAPI connection object

Details

Although the POST /token call for authentication has been deprecated after version 1.1 of the BrAPI specification, its functionality is still retained for compatibility reasons with the Breeding Management System (BMS Pro) of Integrated Breeding Platform to allow users to obtain a valid token from within R and use with additional BrAPIR v2 functions.

Value

A list object of class 'brapi_con' with the authentication token filled.

Author(s)

Maikel Verouden

References

BrAPI v1.1 Specs GitHub

See Also

Other brapiutils: as.brapi_db(), brapi_canInternet(), brapi_checkCon(), brapi_connect(), brapi_db(), brapi_serverinfo_expiration(), brapi_serverinfo_show(), is.brapi_con(), print.brapi_con(), print.brapi_db()

Examples

## Not run: 
# Create a connection object for BMS
con <- brapi_db()$bms_test
class(con) <- c("list", "brapi", "brapi_con")
# Add a username between the double quotes
con[["user"]] <- "" # put your username in between the double quotes
# Add a password between the double quotes
con[["password"]] <- "" # put your password in between the double quotes

# Login
con <- brapi_bms_login(con = con)

## End(Not run)


mverouden/brapir-v2 documentation built on April 22, 2022, 9:24 a.m.